8

As of today, almost all of my app's calls to share links on user's feeds are failing with the following error:

{
    "message": "(#1500) The url you supplied is invalid",
    "type": "OAuthException",
    "code": 1500
}

Uisng PHP cURL, I'm posting to https://graph.facebook.com/{user_id}/feed and submitting a link parameter pointing to a valid, working URL (plus message params) etc.

Strangely, I can issue a command line cURL request and the request seems to work correctly (at least I haven't had an error yet).

I don't want to file a bug report yet incase I've missed something in a breaking migration. Any ideas as to what may be causing this?

Graham
  • 6,484
  • 2
  • 35
  • 39
  • 1
    Can the URL be shared manually on Facebook? Does the URL validate in [Facebook's Debug Tool](https://developers.facebook.com/tools/debug)? – Igy May 02 '13 at 14:15
  • @Igy - if I paste the URL directly into the status box it is scraped correctly. By entering the URL into the debugger I get "Direct creation of this object type is forbidden" ? – Graham May 02 '13 at 14:29
  • OK - have updated the og:type to 'website' and the debugger no longer reports errors, so I'll see if this resolves the problem. – Graham May 02 '13 at 14:47
  • 2
    @Igy - looks like that's fixed it (previously the og:type was 'photo'). Doesn't explain why it worked over commandline cURL but seems to be working now. – Graham May 02 '13 at 15:32
  • I had the same problem - was not passing the "type" and as soon as I added that, it works again. – daamsie May 07 '13 at 00:05
  • I have the same issue, but it doesn't work for the first time, next time it is working as fine. any idea to fix this. – Ramesh Akula May 09 '13 at 09:29
  • I've found the problem is still occurring randomly (although not as frequently as before). A very similar bug has been reported to Facebook so it may be useful to add yourself to the bug at https://developers.facebook.com/bugs/136768399829531 . – Graham May 09 '13 at 20:37
  • I have the same problem as @RameshAkula. First two posts to a new graph object fail with the above mentioned error message, and the third post goes through. FB debugger shows no errors and all graph info is scraped correctly. – chuck w May 10 '13 at 05:34
  • Added for reference. Current Reopen facebook bug here. https://developers.facebook.com/bugs/136768399829531 – scalopus May 11 '13 at 18:01

3 Answers3

2

http://developers.facebook.com/bugs/476666205677592

I have this problem too. it happened randomly. I'm sure the url I supplied is valid and can not reproduce it. So reported bug here..

raven
  • 188
  • 11
  • 3
    ah. this can not be counted as a answer. but I can't find "add comment" link on your post.. – raven May 03 '13 at 02:02
2
Erro While FB Publish: {contents = "(#1500) The url you supplied is invalid"}

Solution:
1. Go to: https://www.facebook.com/
2. Click on Setting > manage app
3. Select "Edit App" button
4. Select "Permission" under the "Setting" panel at left side
5. Make Auth Token Parameter:  To "URI Fragment(#access_token=…)"  
6. Click "Save Changes" button.

Its fixed now!!!
Sandip Patel - SM
  • 3,346
  • 29
  • 27
1

The solution for me was:

1) I uploaded photo to my facebook user account

$fb->setFileUploadSupport(true);
$fb->setAccessToken('access token of my user (just to post an image)');
var_dump($fb->api('/me/photos', 'POST', ['image' =>'@F:\\fb\\fb_2.jpg','msg' =>'sss']));

2) After that set access for this picture to "For everyone" on my facebook page.

3) Then took var_dumped id to url https://www.facebook.com/photo.php?fbid={var_dumped id}

4) For every user, authorized my app, the following code started work normally $fb->api('/' . $fbuserid . '/feed', 'POST', [ 'link' => 'https://www.facebook.com/photo.php?fbid={var_dumped id}', 'message' => 'my post', 'type'=>'photo']);

Ziumin
  • 4,800
  • 1
  • 27
  • 34