PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Thursday, January 6, 2022

[FIXED] Posting an image to a reply using Graph API

 January 06, 2022     facebook-graph-api, facebook-php-sdk     No comments   

Issue

I'm trying to post an image from a URL to reply to a certain comment on Facebook. The Graph API documentation at https://developers.facebook.com/docs/graph-api/reference/object/comments/ mentions that you can publish an image from a URL using the 'attachment_url' field.

When I try that in Graph API explorer by posting attachment_url to {comment_id}/comments, I get the following error:


{
  "error": {
    "message": "An unexpected error has occurred. Please retry your request later.", 
    "type": "OAuthException", 
    "code": 2
  }
}

If I try to post a message, it works perfectly, but attachment_url doesn't work, even though the documentation mentions it. Anybody has any idea what's going on here?

NOTE: I wanna first try to knock it off using the Graph API Explorer, then I would move to my desired language. As such, I don't have any code to paste here. Thanks


Solution

This was a bug in the API and about 2 weeks after my report, Facebook has finally resolved this. Here is the bug report:

https://developers.facebook.com/bugs/1487638524783972



Answered By - Ibrahim
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home
View mobile version

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing