You need to read all app requests for user upon login You need to delete each app request after processing it, so it won't be processed again.
So existing user sends an app request to none approved user. It works as invite. You can provide the message as Invite you blabla. And set data field to some value as invite, so you would know this request is to invite.
Once the none approved user joins your app, you read its app requests, and you see that existing user sent him a request with data as invite. Then you go credit this user for inviting and delete this app request. If multiple users have invited this new user, you either credit all of them or compare created_time field to know who was the first.
Same thing with sending lives and hearts or bonuses to each other.
User sends other user a heart or a bonus, you store all the data you need in data field (up to 255 characters) and the when other user logs in, check the requests and display the message, accept, delete, ignore. On accept credit the bonus to user and offer to send one back and delete request On delete simply delete request On ignore, do nothing and same request will be displayed next time you load the user or on push of specific button, etc
I see.
I was using Parse REST API for storing some extra data, so for instance an invitation request for logged user as a Invitation class in the following way:
Invitation (from, to, status)
where status can be "accepted", "denied", "ignored"... and from, to will be Facebook userid (unique for my app)
App-scoped User IDs: To better protect people's information, when people log into a version of your app that has been upgraded to use Graph API v2.0, Facebook will now issue an app-scoped ID rather than that person's orginal ID. However, for users that have previously logged into your app, the user ID will not change.
Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!). https://deluxepixel.com
I made up a new fb account and it appeared to grab the correct image.
Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!). https://deluxepixel.com
@ar2rsawseen hello. Can you put somewhere separate sample working on taking pictures with the Facebook? I get login, but on "facebook:getProfile()" application crash.
Hello, I have an issue using the facebook labs plugin 0.6 on iOS. When I launch it and try to login, the phone switch to facebook application asking my facebook account to grant access to my application. When I accept it, the phone switch back to my application but then it crashes without any error message. I tried with both GiderosPlayer and App exported but both make it crash. I was not able to find out what happened, even prints in the Login_complete callback are never reached.
On android, ot appears that there is an issue with the Facebook app. A similar behavior is observed when facebook app is installed.
Has someone experienced such issues? Otherwise, can you provide a code sample to log in and retrieve basic infos? Am I missing something?
@lsouchet so both android and ios versions does not work for you? There should be at least some errors or pointers in logcat in eclipse or log output in xCode, aren't there any?
Android is working properly if no Facebook app is installed, it does all access granting process through we browser.
I haven't got any logs last time I tried. As for iOS, I used to have an error about NSNetwork not reachable but I did not manage to reproduce it yesterday. I will keep on trying to get usefull logs to help, but I would like to have a code sample to be sure I am doing it the right way.
Hi @ar2rsawseen, So I tested with your example and on my iPad I have the following behavior when I run it in the player: - Switch app to FB app asking me once for account authorization - After I accepted, switch back to another app (Gideros player?), black screen, then home screen of gideros player with device IP address.
In xCode console, I don't have any faulty log, only (approximately, I don't have the exact logs right now):
Gideros starting render thread Gideros end render thread
And appearently the debug session of the app stops after the black screen. It appears that during the black screen, the app crashes and automatically reboot but detach debugging session from XCode.
As for the app configuration, I did stuff on FB website to get an app token and I downloaded the plugin from the labs and installed it as I did for all plugins.
Thanks to both of you, I found my way out. Exported the app allowed me to do the whole facebook config of my project again. There was some errors in my .plist.
It works for me in both app and player. I'll let you know if I encounter other problems. Thanks again!
Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!). https://deluxepixel.com
Comments
I was using Parse REST API for storing some extra data, so for instance an invitation request for logged user as a Invitation class in the following way:
App-scoped User IDs: To better protect people's information, when people log into a version of your app that has been upgraded to use Graph API v2.0, Facebook will now issue an app-scoped ID rather than that person's orginal ID. However, for users that have previously logged into your app, the user ID will not change.
"https://graph.facebook.com/"..id.."/picture?type=square"
https://deluxepixel.com
https://deluxepixel.com
https://play.google.com/store/apps/details?id=com.uglygames.slug
https://graph.facebook.com/{id}/picture?type=small
https://graph.facebook.com/{id}/picture?type=square
https://graph.facebook.com/{id}/picture?type=normal
https://graph.facebook.com/{id}/picture?type=large
Basically here is the example on how I do it:
http://giderosmobile.com/forum/discussion/comment/33814#Comment_33814
Will try to add it somewhere in the examples
https://play.google.com/store/apps/details?id=com.uglygames.slug
I have an issue using the facebook labs plugin 0.6 on iOS.
When I launch it and try to login, the phone switch to facebook application asking my facebook account to grant access to my application. When I accept it, the phone switch back to my application but then it crashes without any error message.
I tried with both GiderosPlayer and App exported but both make it crash. I was not able to find out what happened, even prints in the Login_complete callback are never reached.
On android, ot appears that there is an issue with the Facebook app. A similar behavior is observed when facebook app is installed.
Has someone experienced such issues?
Otherwise, can you provide a code sample to log in and retrieve basic infos?
Am I missing something?
Thanks in advance.
There should be at least some errors or pointers in logcat in eclipse or log output in xCode, aren't there any?
Android is working properly if no Facebook app is installed, it does all access granting process through we browser.
I haven't got any logs last time I tried. As for iOS, I used to have an error about NSNetwork not reachable but I did not manage to reproduce it yesterday.
I will keep on trying to get usefull logs to help, but I would like to have a code sample to be sure I am doing it the right way.
Thanks.
So I tested with your example and on my iPad I have the following behavior when I run it in the player:
- Switch app to FB app asking me once for account authorization
- After I accepted, switch back to another app (Gideros player?), black screen, then home screen of gideros player with device IP address.
In xCode console, I don't have any faulty log, only (approximately, I don't have the exact logs right now):
Gideros starting render thread
Gideros end render thread
And appearently the debug session of the app stops after the black screen.
It appears that during the black screen, the app crashes and automatically reboot but detach debugging session from XCode.
As for the app configuration, I did stuff on FB website to get an app token and I downloaded the plugin from the labs and installed it as I did for all plugins.
Is there a special step that I am missing?
I am a bit lost here...
thank you for your help!
Do not use player, it often fail.
Install the app as non player,
and don't forget to remove "fbxxxxx" from GiderosPlayer and add it to your app.
Hope this help.
----
I did have an error like this, but that because i override application openURL at AppDelegate, might be not your problem.
that URL scheme, which you probably added to your Gideros Player.
Do not forget to remove it, and add it to your installed app.
Exported the app allowed me to do the whole facebook config of my project again. There was some errors in my .plist.
It works for me in both app and player.
I'll let you know if I encounter other problems.
Thanks again!
https://developers.facebook.com/products/anonymous-login/
Has anybody implemented in some Gideros game?
https://deluxepixel.com
Any plans to update to lastest Facebook SDK versión?
https://developers.facebook.com/docs/android/getting-started