Android Question Link to Facebook Page

Powie

Member
Licensed User
Longtime User
How I have to link perfect to a facebook page.....

Example:
In my Database I have the FB Site Id: modelairfields.
In Browser I Have to open https://facebook.com/modelairfields

In iOS it uses: fb://modelairfields

Is it possible to link directly to com.facebook.katana ?
 

Douglas Farias

Expert
Licensed User
Longtime User
B4X:
Dim p As PhoneIntents
StartActivity(p.OpenBrowser("https://facebook.com/modelairfields"))
 
Upvote 0

Powie

Member
Licensed User
Longtime User
So, if anybody later also will use it, this is the solution.

First, fetch the page id from FBgraph, in my example: modelairfields: https://graph.facebook.com/modelairfields

This gives me the ID: 257995927658591

The Code for B4A:

B4X:
Try
    Dim In As Intent
    In.Initialize(In.ACTION_VIEW, "fb://profile/257995927658591")
    StartActivity(In)
Catch  
    Dim p As PhoneIntents
    StartActivity(p.OpenBrowser("https://facebook.com/modelairfields"))
End Try

It starts the Facebook app, if not installed, it starts the browser.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…