I want to share a post to a page's feed. I am using the {page-id}/feed endpoint. I make a POST request with link={original-post-link}. This works if the original post doesn't contain any links. Then the text of the original post is shared as expected. However, if the original post contains a link, only the link is shared. The text is not. When I try to share the original post from the website, I get the option "Include Original Post". Is there a way to do the same from the API?
Related
I would like to achieve the following:
GET all posts from a page and their related content (attachments, likes, visibility, tags, shares, comments, creation time...)
POST all that content in a new page
Assuming that I am admin of both pages.
I know that it's pretty straight forward to loop over the feed of a page and get all the posts' information. However, I'm not so sure about the POST part:
I guess that Facebook doesn't allow to "clone" people's
like/shares/comments below each post, on their behalf?
Considering that I will delete the first page, will all attachments disappear from Facebook's servers as well?
You cannot post in behalf of another user. And you cannot get all information you need with the Graph API.
What about renaming the page? If you like to delete the first page and clone it before, it looks like a rebranding or something ...
I need a solution where I can unpublish/delete comments on Facebook Ads. There are paid tools which have this feature, like this one:
https://www.agorapulse.com/blog/comments-facebook-dark-unpublished-posts
"Finding and responding to these comments was a major headache, so we
went digging on Facebookâs API and found a solution to include all
comments made on dark/Unpublished posts and we included them in our
unified Facebook Inbox."
With the normal command endpoint I can't get the commands for ads.
How I can access and manage the commands, which API endpoints I need?
There are a few endpoints you'll most likely be interested in:
1) Your ads are connected to a page, so you'll need to get data for your Page. See https://developers.facebook.com/docs/pages/managing for reference.
2) Your page contains the posts. See the section titled "Getting Page Posts" in the link from step 1.
3) The posts contain comments. Using the id of the post, make the appropriate API calls to get its posts. See https://developers.facebook.com/docs/graph-api/reference/v2.9/object/comments/ for reference.
4) Once you find the comment you want to delete, make the appropriate DELETE call on it. See graph-api/reference/v2.9/comment/ for reference.
I am fetching all public post with specific hashtag. The problem is that the result only shows some of the post but not all.
It is any restrictions or rules in what post are indexed and show in the "search".
I'm using https://graph.facebook.com/search?q=myhashtag&type=post.
What I can see so far is that in the facebook page when I search for the hashtag I have some results and they are different that the ones the api returns.
i am using graph api explorer and an application to post on the wall of a page of my own
when i use the field message and put in it the link it will be posted as a link string only without the pictures in the link as u post it from outside the graph explorer and the poster will be the name of the page via the application
but when i use the "link" field and put the link in it, it will give the form that i want but the poster will be the name of the account and not the name of the page
1st of all: i am trying the post in the graph api explorer before i use my c# console application that will post to the page wall. if i copy the link of a website page and open the page through facebook and paste the link in the status filed it will automatically generate something like a form that contain the picture and some details and if i click post the status will appear as posted by the page itself and it will contain first the link as a text and then the form that i talked about will appear
if i use the c# sdk and post the status as: fbArgs["message"] = txtT.ToString(); facebook.Post("/PAGE_ID/feed", fbArgs); the post will contain the link only without the form that appears automatically when I post the same string in the facebook page website. if i use the "link" field with the link as a value it will be posted by the name of the account but with the form that i want?
how can i post a link that will generate automatically the form that will be created when u paste a link in the status edit box on the facebook website??
You cal refer to this old stackover flow question: Facebook Graph API PHP SDK posting on page as page
You have to manually specify the meta tags for the link using the parameters:
picture Post thumbnail image (can only be used if link is specified)
name Post name (can only be used if link is specified)
caption Post caption (can only be used if link is specified)
description Post description (can only be used if link is specified)
You can create a post on a Page by issuing an HTTP POST request to
PAGE_ID/feed with the publish_stream and manage_pages permissions and
the following parameters. Additionally, Page posts can also be
scheduled to go live at a future time up to 6 months or can be created
in an "unpublished" state where they are not visible on the pages
timeline or in the page fan's news feeds. Unpublished posts can be
used as Sponsored Stories.
Read more at: http://developers.facebook.com/docs/reference/api/page/#links
I've recently switch my code to post to facebook from
https://graph.facebook.com/[profile_id]/feed
to
https://graph.facebook.com/[profile_id]/links
Now i'm getting this problem, can anyone help?
- my picture that i accompany with the post is not showing, it look like facebook is defaulting to the first image it find on the link page
http://developers.facebook.com/docs/reference/api/post/
http://developers.facebook.com/docs/reference/api/link/
both of these document allow me to specify a picture, but somehow the "links" one isn't displaying the image.
Thanks in advance
Set correct Open Graph meta tags, especially og:image.
I just resolved similar issue, posted news on website and posted via /links to fanpage resolved in post with wrong image content and "site not found" title.
The issue was related to wrong code sequence. We hooked posting news via fb api in not-so-good place. The post should have been already available but it wasn't and posting to fb api results in immediate request from facebookexternalhit bot to check if it exists. Detailed log analysis shown that ping from facebook was before POST to add news finished, that's why we had messed content there.
Sample content we post, if what I described above is not your case:
content_dict =
{
'picture': 'http://www.czerwonysmok.pl/static/media/uploads/blog/pb_reddragon_all2_poprawiony_czerwony.jpg/',
'message': 'Title \n\n contentcontentcontentcontentcontentcontentcontentcontent ',
'link': 'http://www.czerwony-smok.pl/klub/aktualnosci/rashguard-ze-strony/'}
try:
logger.info("Publishing to facebook: " + str(content_dict))
graph.post(path="%s/links" % settings.FAN_PAGE_ID, **content_dict)
About sharing on my Android app i'm using this code:
Bundle postParams = new Bundle();
postParams.putString("message", "User's custom message above share content");
postParams.putString("name", "The name of the link attachment.");
postParams.putString("description", "The description of the link (appears beneath the link caption). If not specified, this field is automatically populated by information scraped from the link, typically the title of the page.");
postParams.putString("caption","The caption of the link (appears beneath the link name). If not specified, this field is automatically populated with the URL of the link.");
postParams.putString("picture","The URL of a picture attached to this post. The picture must be at least 200px by 200px. See our documentation on sharing best practices for more information on sizes.");
postParams.putString("link", "The link attached to this post");
Refer to the document for detail: https://developers.facebook.com/docs/sharing/reference/feed-dialog/v2.3