Search code examples
facebook-graph-apiunity-game-enginefacebook-unity-sdk

Facebook Unity AppRequest OGActionType?


Hello I am using the following code to make App Request to ask my friends for lives:

FB.AppRequest(
        "Will you Send me a Free Life?",
        Facebook.OGActionType.AskFor,
        objectId,
        null,
        "FreeLife",
        "GameName",
        AppRequestCallback
        );

where objectId is the id I got when I created a new object from the Object Browser at Facebook Developers.

When I run it on iOS. I receive the following Error:

{"error_code":"100","error_message":"Object+type+'Game'+for+ID+'objectId'+is+not+owned+by+this+app."}

Can anyone guide me how to fix it? Thank you


Solution

  • First create an object in graph api and then also create that object through object browser. Note: Make sure is_scraped property is false for object created through object browser.