0
votes

I am trying to integrate facebook sdk in my android app. I want to use the deep link functionality for which i need a canonical url. I am not able to get the canonical url from api calls. I saw this question on stackoverflow. When I used the command

curl -G https://graph.facebook.com/YOUR_APP_LINK_HOST_ID \
-d access_token="APP_ACCESS_TOKEN" \
-d fields=canonical_url \
-d pretty=true

I got this error

{ "error": { "message": "(#803) Some of the aliases you requested do not exist: YOUR_APP_LINK_HOST_ID -d", "type": "OAuthException", "code": 803 } }curl: (6) Could not resolve host: access_token="APP_ACCESS_TOKEN"

Note: i replaced the original app access token with "APP_ACCESS_TOKEN".

1
You did replace the text YOUR_APP_LINK_HOST_ID with an actual app-link host id though, right …? - CBroe
yes. all values were real in the command. can't post them here though. - Saurabh
{ "error": { "message": "(#100) Tried accessing nonexisting field (canonical_url) on node type (Application)", "type": "OAuthException", "code": 100 } Now Iam getting this error - Saurabh
β€œon node type (Application)” – that sounds like you did not use an app link id, but put your application id after https://graph.facebook.com/ - CBroe

1 Answers

0
votes

I couldn't get the command to work. I had to create the canonical url using the GUI at this link.