This library will allow your apps to interact with Facebook.
Requirements:
1- B4A 3.x
2- Facebook account.
3- Copy the Facebook.xml and Facebook.jar to your additional libraries directory.
Usage:
The attached files contain:
a- The Facebook library.
b- "How to create a Facebook app" quick guide.
c- A sample project.
NOTES: You have to have some basic knowledge of the Facebook API to use it, especially about permissions, the library allows you to interact with Facebook but you are responsible to add/remove the necessary permissions for the actions you want to perform.
You have to create a Facebook app before you can use the library, the instructions are in the quick guide mentioned on item "b" above.
A DEMO app (apk) is also attached for you to take a look at the library's functionality.
Library recompiled on May 28, 2017 (B4A 6.8+)
Requirements:
1- B4A 3.x
2- Facebook account.
3- Copy the Facebook.xml and Facebook.jar to your additional libraries directory.
Usage:
B4X:
'Initialize the library
Dim FB As Facebook
'Get the following 3 fields from Facebook after creating a Facebook app.
Dim AppID As String = "<APP_ID_FROM_FACEBOOK>"
Dim AppSecret As String = "<APP_SECRET_FROM_FACEBOOK>"
Dim myWebsite As String = "<LINK_TO_THE_WEBSITE_IN_REDIRECT_URI>"
FB.Initialize(Activity, Me, "myFB", AppID, AppSecret, myWebsite)
'Login to Facebook
FB.Login
'Get your profile
FB.GetMyProfile
...
'Display profile fields
Sub myFB_MyProfile_Response(Profile As Map)
Dim Temp As String
For I = 0 To Profile.Size - 1
Temp = Temp & Profile.GetKeyAt(I) & ": " & Profile.GetValueAt(I) & CRLF
Next
Msgbox(Temp, "My Profile")
End Sub
The attached files contain:
a- The Facebook library.
b- "How to create a Facebook app" quick guide.
c- A sample project.
NOTES: You have to have some basic knowledge of the Facebook API to use it, especially about permissions, the library allows you to interact with Facebook but you are responsible to add/remove the necessary permissions for the actions you want to perform.
You have to create a Facebook app before you can use the library, the instructions are in the quick guide mentioned on item "b" above.
A DEMO app (apk) is also attached for you to take a look at the library's functionality.
Library recompiled on May 28, 2017 (B4A 6.8+)
Attachments
Last edited: