I'm using Facebook SDK for Unity 5.1. But I have problems developing Android apps.
See the following:
void GetInviteFriends() {
FB.API("/me/invitable_friends", Facebook.HttpMethod.GET, FriendCallback);
}
Facebook Graph API 2.0 has invitable_friends
query. It's returned to friends token. (not id)
I have read many manuals, many examples, Q&As but cannot find how to use 'FB.Apprequest : invitable_friends query, Facebook SDK 5.1 for Unity3D
'.
Other example(javascript): using FB.ui
.. friend token insert 'to' parameter. it's OK.
Facebook SDK for Unity has FB.AppRequest
. it gives a useful App Request User to User.
but, FB.AppRequest
's to
parameter does not read friend token...
or i don't use friend token. my apps is public, and in game category.
it inserts friend token's to
parameter result.
400 Bad Request
UnityEngine.Debug:LogError(Object)
FbDebug:Error(String)
Facebook.FallbackData:JSFallback(String)
Facebook.AsyncRequestDialogPost:CallbackWithErrorHandling(FBResult)
Facebook.<Start>c__Iterator0:MoveNext()
i don't know what is the problem.
and this is the external call messages
External Call: fbUi("{\"message\":\"I'm Invite to you.\",\"to\":\"AVnBTaC8ez5yUfksw2oOTepdNOaVkQqTKH2bQ1CW9R4U88MEGDUvtF2C9mclasIBT9am7ADKbIdzq3SXMpWx3dTDcR7oPwV18kzPcKZlSQaoIA\",\"title\":\"Friends to Invite\",\"app_id\":\"1449208528671088\",\"locale\":\"en_US\",\"method\":\"apprequests\"}", "1");
UnityEngine.Application:ExternalCall(String, Object[])
Facebook.CanvasFacebook:JSFallbackUI(String, Dictionary`2, FacebookDelegate)
Facebook.FallbackData:JSFallback(String)
Facebook.AsyncRequestDialogPost:CallbackWithErrorHandling(FBResult)
Facebook.<Start>c__Iterator0:MoveNext()
this is my FB.AppRequest
form.
public static void AppRequest(
string message,
OGActionType actionType,
string objectId,
string[] to,
string data = "",
string title = "",
FacebookDelegate callback = null)
{
FacebookImpl.AppRequest(message, actionType, objectId, to, null, null, null, data, title, callback);
}
I used this:
FB.AppRequest(
DirectRequestMessage,
null,
"",
DirectRequestTo,
"",
DirectRequestTitle,
Callback
);