I have two facebook accounts installed my app and both accounts are mutual friend. I can have my facebook accounts logged in the app and the facebook id and name could be retrieved and showed in the app perfectly. (both have permission to share the user list)
Once I use FacebookGetFriends() and FacebookGetFriendsState() , FacebookGetFriendsState() will return -1 (error) even GetFacebookLoggedIn() returns 1.
Anyone can helps. Thanks a lot
My code is as follows:-
function ConnectFacebook ()
FacebookSetup("[my app id]")
FacebookLogin()
repeat
if GetFacebookLoggedIn() = 1
if FBuser<>1
FacebookGetFriends()
facebookid=FacebookGetUserID()
facebookname=FacebookGetUserName()
FBuser=1
endif
if FacebookGetFriendsState() =1
fbfriendscount=FacebookGetFriendsCount()
fbfriends.length=fbfriendscount
for i=0 to fbfriendscount
fbfriends[i].id = FacebookGetFriendsID (i)
fbfriends[i].name = FacebookGetFriendsName (i)
next i
FBconnect=1
endif
endif
until FBconnect= 1
endfunction