Sub Process_Globals
End Sub
Sub Globals
Dim f As fb
End Sub
Sub Activity_Create(FirstTime As Boolean)
f.Initialize("fb","531882130230394")
Dim b,b1 As Button
b.Initialize("bnt")
b.Text = "Login to FB & Post Photo"
Activity.AddView(b,0,0,100%x,60dip)
b1.Initialize("bnt1")
b1.Text = "Logout from FB"
Activity.AddView(b1,0,100%y-60dip,100%x,60dip)
End Sub
Sub Activity_Resume
f.onResume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub bnt_Click
f.Login
End Sub
Sub bnt1_Click
f.Logout
End Sub
Sub fb_LoginOnLogin
Dim bmp As FbPhoto
bmp.Initialize
bmp.Name="B4A App testing"
bmp.Image = LoadBitmap(File.DirAssets,"users.png")
f.PublishPhoto(bmp.build,Null)
End Sub
Sub fb_PublishPhotoOnComplete(Id As String)
Log("Photo published with ID=" & Id)
End Sub
Sub fb_PublishPhotoOnException(Exception As String)
Log(Exception)
End Sub
Sub fb_PublishPhotoOnFail(Reason As String)
Log(Reason)
End Sub
Sub fb_PublishPhotoOnThinking
Log("Publish Photo Thinking")
End Sub