Sub Globals
Private fb As Facebook
Private AppID As String = "123451234512345..."
Private AppSecret As String = "abcdefgabcdefg..."
Private myWebsite As String = "http://www......"
End Sub
Sub Activity_Create(FirstTime As Boolean)
fb.Initialize(Activity, Me, "myFB", AppID, AppSecret, myWebsite)
End Sub
Sub PostNow
If fb.IsUserLoggedIn Then
fb.PostToTimeline("me", "some message","http://.............")
Else
Do_Login
End If
End Sub
Sub Do_Login
Dim ListOfPermissions As List
ListOfPermissions.Initialize
ListOfPermissions.AddAll(Array As String(fb.PERMISSION_PUBLISH_STREAM, fb.PERMISSION_PUBLISH_ACTIONS))
fb.LoginWithPermissions(ListOfPermissions)
End Sub
Sub myFB_Login_Response(Success As Boolean)
If Success Then
fb.HideFacebookScreen
PostNow
End If
End Sub
Sub myFB_Facebook_ErrorMessages(Message As String)
Try
Msgbox2(Message, "Facebook Error", "Close-Bad", "", "", Null)
Catch
' Whoops
Log("try was catched")
End Try
End Sub