Sign In Register

How can we help you today?

Start a new topic
Answered

Problem with FacebookConnectRequest

Hi

I am trying to follow the Topic - "how to authenticate players using their facebook account" from the Manual. But I am facing some issues-


1) As mentioned in the tutorial i created test users in the facebook app. Using their access token i tried to run the facebookConnectReequest from testHarness.


{

 "@class": ".FacebookConnectRequest",

 "accessToken": "CAAMJZBvk4XAYBAIlwBmDou3NfkFcYBr6IHZAnGnOz6ZChmn4ABfVi72UiNDvZA6YT6kveqlUxnpNckO554ZCNwJo7YWwQq7wAZBwOZBLd35mdjw4RNIm2XyOnWAu2o6wTkPHxuRDpEbzr6QAVkLoZCUuDtlU1lNgy2m5ujaYHxqRDvpEZC5JxhvAjZAzdjkVFw5d3irmbBU6gMdCihZAkMnsq6AZCGI7Y4HFiUsZD",

 "requestId": "1412753633233"

}


But in response I am getting the display name  as the name of the developer not the test user name. I tried it with different test users but the result is same. 

To confirm that the problem is not from the facebook side i tried their Graph API but the result from that was correct.


2)When i try to run listInviteFriendRequest the result is always :


{

 "@class" : .ListInviteFriendsResponse,

"requestId" : "1412757611245",

"scriptData":null

}

even if i use the access token of my own account then also the result is the same.

As per my understanding this should return a list of all the friends in facebook.

And ListGameFriendRequest is used to get the list of friends who are already registered in the game.


Thanks in advance.


Shubham


Best Answer

For our earlier project, this was an issue. So we ended up with having a button named "Invite Facebook Friends" and linking it to AppRequests dialog on Mobile.


If you are interested on how it looks check this game name "Pro Rated Mobile Golf" on ios or android stores.


Basically from FB 2.0, they made this change. For games hosted on Facebook.com they have better option to get the list. For Mobile to my knowledge its limited to Dialogs currently.


FB APP REQUESTS


Thanks,

Ayyappa.





Hey Shubham,

To answer part 1. If you use the  "doNotLinkToCurrentPlayer" feature and set it to true it will not connect to the same user. This isn't included in the tutorials as it was added to GameSparks after the tutorial was posted. We plan on updating them as soon as possible.

Regarding issue 2, facebook recently changed the behaviour regarding this. They will only allow you to show players of the game who are friends. Non players will no longer show up. We are hoping to find a fix or work around for this going forward and this feature will be removed from the docs and platform in an upcoming sprint. 

Hope this helps.

Regards,
Jamie


 

Hi Jamie

For the first part I tried your solution and it was working on Friday(10 oct). But when I tried today it again stopped working and for every access token I am getting the same name even if i set "doNotLinkToCurrentPlayer" to true.

Is this feature  a work in progress?? if yes then is there any work around so that i can use it without any problem.


PS: right now I am trying it with Test Harness and there itself it is not working.


Thanks

Shubham



In regards to ListInviteFriends:


You cannot get a list of friends that are not authorised with an app... UNLESS you have a Facebook Canvas App as well. It seems Facebook are trying to force developers into using the Canvas App and Facebook App Center features to be able to take advantage of their network.


You cannot simply setup a dummy Facebook Canvas app either as Facebook invites will direct users to your Facebook Canvas URL which will be a dead link...


Annoying. Anyone else found a way to do invites without Canvas?

Answer

For our earlier project, this was an issue. So we ended up with having a button named "Invite Facebook Friends" and linking it to AppRequests dialog on Mobile.


If you are interested on how it looks check this game name "Pro Rated Mobile Golf" on ios or android stores.


Basically from FB 2.0, they made this change. For games hosted on Facebook.com they have better option to get the list. For Mobile to my knowledge its limited to Dialogs currently.


FB APP REQUESTS


Thanks,

Ayyappa.