Making Facebook Graph Photos Api Work with url

As per the documentation on Facebook https://developers.facebook.com/docs/graph-api/reference/v2.2/user/photos/

For /photos api if we want to post a photo to user timeline, using an url on open internet then we must:

POST /v2.2/me/photos HTTP/1.1
Host: graph.facebook.com

source=%7Bimage-data%7D


But this gives:

{
  "error": {
    "message": "An unknown error has occurred.",
    "type": "OAuthException",
    "code": 1
  }
}

We should avoid adding {} or encode %7B and %7D around image-url for this to work. So correct would be:


POST /v2.2/me/photos HTTP/1.1
Host: graph.facebook.com

source=image-data

Comments

Popular posts from this blog

Most expensive product on Amazon India By Category

8 Product Management lessons from the movie 'Gold'