skip to Main Content

I creating personal application from Facebook Graph, and can’t find any examples: how to attach my local picture from (my fan-page, when I’am admin) to scheduled publish posts. Without pictures – post is delay in time fine. If I want to publish with pictures now same fine. I’m report to .facebook.com/bugs/ and get answer “use object_attachment”, but how to use, I don’t now(

My query:

https://developers.facebook.com/tools/explorer/145634995501895/?method=POST&path=id_page_%2Ffeed&version=v2.8&message=text_delay&scheduled_publish_time=1486755500&published=false&object_attachment=194418771038550 + token_page

What it’s wrong??
p.s. I have all markes and do in Graph API Explorer
p.s.s. success upload (to fan_page) image and get id

2

Answers


  1. Chosen as BEST ANSWER

    Multiple images in single post for the planned publication:
    first:
    you need upload each photo to: URL_GRAPH + "/" + page_id + "/photos with fields: "published=false" and "access_token=your_acces_token_page" then you got id image

    second: click me

    ....cebook.com/tools/explorer/145634995501895/?method=POST&path=page_id%2Ffeed&version=v2.8&attached_media[0]=%7B"media_fbid"%3A"200293027117791"%7D&attached_media[1]= %7B"media_fbid"%3A"200293223784438"%7D&message=sadasd&scheduled_publish_time=1487624100&published=false + page_token

    UPD:

    so this is work... (through Explorer...)
    https://yadi.sk/i/zkJFg2lj3EGs8z
    https://yadi.sk/i/6poalYCD3EGs9b


  2. The /feed edge does not support the object_attachment parameter when scheduling a post – it is deprecated (though still documented with no mention of its deprecation), according to this Facebook Bug Report: https://developers.facebook.com/bugs/1160824890650326/

    Despite the documentation clearly listing it as a parameter, the process to post a photo or video is to use the /photos or /videos edge instead, and pass published=false and scheduled_publish_time=xxxxxxxxxx parameters. The message parameter becomes caption for a photo, and a description for a video.

    This way you don’t need to first upload the photo/video and then use it’s ID in an additional request.

    Here is the documentation for a photo post, since your question is specific to a photo:
    https://developers.facebook.com/docs/graph-api/reference/page/photos/#Creating


    In the format you have shared, the updated request would look like:

    https://developers.facebook.com/tools/explorer/145634995501895/?method=POST&path=id_page_%2Fphotos&version=v2.8&caption=text_delay&scheduled_publish_time=1486755500&published=false&url=http://example.com/image.png + token_page

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search