Picture posting NOT working with facebook Graph API anymore

前端 未结 6 1815
逝去的感伤
逝去的感伤 2020-12-06 13:41

Picture posting NOT working with Facebook Graph API

The message is posted but the picture is NOT.

I am using the Graph API to post to the wall on Facebook.

相关标签:
6条回答
  • 2020-12-06 13:57

    Posting picture works for me but somehow including a source (swf) causes the picture to not display anymore. This used to work until last week.

    0 讨论(0)
  • 2020-12-06 13:59

    Ken, but what if you want link= to point to something else? this works:

    curl -F \
         "picture=http://tycho.usno.navy.mil/gif/moons/m146.gif" \
         -F "message=you're looking great tonight!" \
         -F "name=Current Moon Phase" \
         -F "link=http://www.calculatorcat.com/moon_phases/phasenow.php" -F caption="How the moon appears tonight" \
         -F "access_token=111111111111111|2222222222222222222222222|33333333333333333333456n" \
         "https://graph.facebook.com/215958041750734/feed"
    

    you can see result at: https://www.facebook.com/pages/The-Moon/215958041750734

    0 讨论(0)
  • 2020-12-06 14:00

    works for me using source parameter:

    $graph_url= "https://graph.facebook.com/me/feed?"
              . "source=" . urlencode($_POST["picture"])
              . "&link=" . urlencode($_POST["link"])
              . "&message=" . urlencode($_POST['message'])
              . "&method=POST"
              . "&access_token=" .$access_token;
    $response=file_get_contents($graph_url);
    $json=json_decode($response);
    
    0 讨论(0)
  • 2020-12-06 14:03

    I used the LINK parameter instead of the PICTURE parameter and all seems to be working now. Facebook changed something in regards to the PICTURE parameter where it stopped working. I did NOT change any code on my system and it just stopped working. See http://developers.facebook.com/docs/reference/api/post/

    0 讨论(0)
  • 2020-12-06 14:06

    I had the same problem when posting using the graph api via PHP. Dont know what the cause what, but my image URLs contained a - sign (http://the.url/to/the-image.jpg). After renaming the images, everything worked as expected.

    What is your image url?

    0 讨论(0)
  • 2020-12-06 14:15

    Wait for it

    I noticed that it takes more time for Facebook to process the picture (up to 15 minutes) than to post the link on the timeline (instant).

    0 讨论(0)
提交回复
热议问题