0

I'm using the Facebook Graph API, Mobile hosting API to post a link with the following:

https://graph.facebook.com/{APPID}/app_link_hosts?access_token={ACCESS_TOKEN}&name=Puzzle_1420352145684&ios=[{"url":"MyAPP://playerPuzzles/1420352145684","app_store_id":{MYAPPID},"app_name":"MyAPP"}]&web={"should_fallback":false}

I get the correct result in the form of the ID of the link, with no error.

But when I query the link with

https://graph.facebook.com?ids={LINK}&access_token={ACCESS_TOKEN};

I don't get any app-link data the object is there but empty not even the name.

{"http://fb.me/777314042342441" = {
        id = "http://fb.me/777314042342441";
    };
}

Is there something wrong in my posting that doesn't allow the data to get posted? Thanks for you help in advance.

Leonardo Amigoni
  • 2,237
  • 5
  • 25
  • 35

1 Answers1

0

It seems that the facebook documenatation is wrong. I finally found a solution using the graph explorer. To correctly fetch the data use this style of URL.

https://graph.facebook.com/{APP-LINK-ID}?fields=ios,name,web&access_token={ACCESS_TOKEN};

Please note that you have to call out all the fields you want. The object at least for me didn't include the app_links structure like the documentation.

Here is the link to the wrong Index API

Here is the app_links object structure you can see all the fields you can fetch.

Hope this helps everyone.

Leonardo Amigoni
  • 2,237
  • 5
  • 25
  • 35
  • You can still use https://graph.facebook.com?ids={LINK}&access_token={ACCESS_TOKEN} you just need to also add &fields=app_links – Ming Li Jan 05 '15 at 21:08
  • That's what I first tried but it didn't work for me. – Leonardo Amigoni Jan 05 '15 at 21:23
  • It depends on what version of the graph API you're using. For 2.1 and onward, it should be fields=app_links, before that, it was type=al&fields=android,ios (very unfortunate that there was a change, and I apologize for that, but it is documented in the Index API page you linked to). – Ming Li Jan 05 '15 at 22:16