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

Saturday, February 12, 2022

[FIXED] Publishing a single facebook post with multiple photos

 February 12, 2022     c#, facebook, facebook-graph-api, facebook-javascript-sdk, facebook-php-sdk     No comments   

Issue

Is there a way to publish a single post with multiple photos? e.g. - sample facebook post

You can do this on the Facebook Page when composing a post (composing a post with many photos).

I came across this post but I don't want to create a story.

I want to create a POST on the PAGE with a collection of photos that I can track likes and comments on like the example stated earlier.

I am using the Facebook SDK.Net that has a batch upload feature - but that creates a post per photo.

Is there a way it be done? Or are there any suggestions?


Solution

I do not believe that it is possible to do a Post with multiple photos using the Graph API. Creating a Facebook Post means sending a POST to the endpoint https://graph.facebook.com/me/feed. In that endpoint, you can include a "picture" property in the query string. This is the URL of the picture you want to include in the Facebook post. In your created post Facebook does not reference your picture from that URL, it makes a copy. Example POST request:

https://graph.facebook.com/me/feed?message=check%20out%20this%20picture&picture=http%3A%2F%2Fwww.mydomain.com%2Fmyphoto.png

On the desktop and mobile apps, you can add as many photos as you like but they are still uploaded individually. Using the console you can see that they are uploaded using the endpoint https://upload.facebook.com/ajax/composerx/attachment/media/saveunpublished It is only after you press the "Post" button are they then associated with your status message.



Answered By - Matthew at Critical Cognition
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

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