post a link in facebook graph api explorer as a page - facebook-graph-api

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

Related

Facebook API : Now that post with link won't reach the feed, what would you do?

here is the document state that
Do not include an attachment or action link. If you do, the story will get published and will appear in the stream and on the user's Wall only. It won't appear at the top of the profile or in the Status Updates page.
Just wondering what others choose between
still add a post with your link even it doesn't show in feed
sending just a message and have it in feed?

Facebook graph api post using "/me/feed" vs "/me/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

How does Facebook scrape my website and how can I manually change this information?

I am using the iFrame version of the Facebook like button and was wondering how Facebook scrapes my website. They pulled information in the middle of the page, which was the first paragraph tag, instead of taking from the divs earlier. I was wondering if this is normal and how often Facebook updates their page.
Secondly, I am having problems editing this information in the page settings on the Facebook page that was generated. It would be nice if I could manually override whatever Facebook scrapes from my website.
Thanks,
http://ogp.me/ — more specifically, using an Open Graph description.

Facebook API - what kind of authentication is needed now to query a page's tagged posts?

https://developers.facebook.com/docs/reference/api/page/
I want to be able to get the tagged posts for a page (e.g. harvard). what kind of authentication do i need to have (access_token) or do in order to be able to get those posts? they are publicly available.
You answer lies in the link you posted (https://developers.facebook.com/docs/reference/api/page/)
In the connections section, it says "any valid access_token or user access_token":
tagged
The photos, videos, and posts in which the Page has been tagged.
any valid access_token or user access_token
a heterogeneous array of Photo, Video or Post objects.
So if this is incorrect, you can scroll to the bottom of the link and click the Report Bug link to report an error in the documentation.

Actions do not appear on timeline

I'm developing an app which publishes actions to the timeline.
On the app settings, I've created the action "post" and use the built in object type "article".
Although my graph actions have not been approved by facebook, that should not be a problem, because I am logged in as the developer of the app.
My article URLs pass facebook's linter with warnings, but no errors.
When my app notifies facebook of the the post action, it appears to succeed. Facebook returns an ID representing the action.
When I use facebook's graph explorer to view that ID, the data appears to be correct, showing the correct action type and object data. (If there's a URL to browse the action on facebook, instead of the graph explorer, I do not know what it is).
Still, with all the above apparently working without errors, I never see the action on my timeline. Whether I browse my own timeline, or when logged in as a friend and another developer of the app, I never see any indication on facebook.com that the action was performed.
What am I missing to make my custom action appear on my timeline page?
I had a similar problem. I was using OG and I could post everything successfully, but the posts didn't appear in timeline, but only in the activity log in Facebook.
I just went to the settings of the action and set "Explicitly Shared: This action can specify the user explicitly shared an action." to ON.
Then in my piece of code I put "true" to the key "fb:explicitly_shared" while creating the OG object.
If no error is being returned it sounds as if there is an issue in your public page that is preventing Facebook from knowing what to post.
Have you double checked your OG: meta tags through Facebook's validation tool [ https://developers.facebook.com/tools/debug ]. While you need all of the values to be filled in, the type bit is the most overlooked and must be setup properly to link to your particular application and corresponding action.
If your OG: data is correct and validating you should also check the detail settings for your action and aggregations. If the phrase / tense bits are not filled in Facebook may be uncertain how to make your post appear back to on the timeline.
Discoverd the problem....
My article page include an article:author tag. The URL in that tag was not visible to anonymous users. So, I'm guessing, facebook visited that author URL and received a HTTP 403.
When I removed the article:author tag, the items started appearing on my timeline.
So be careful with all tags and put all urls through facebook's debug tool.
Hmmm Interesting
Was having the same issue...
Using the XFBML, fb:like with all required og meta tags validating on the linter.
Last month when I liked a 'product' on my website, the post was published on my fb timeline wall no worries. Nice, perfect!
Today after clicking Like, I noticed it wasn't publishing to my timeline wall at all... but was logged in the Activity Feed.
It did however post to my wall if I commented on the Like Button flyout comment section.
Then I found this
"Pages of type article do not have publishing rights, and will not show up on user's profiles because they are not real world objects."
https://developers.facebook.com/docs/opengraphprotocol/#types
I've been getting the same issue with a feed dialog post. The posts can be navigated to directly, but doesn't show on timeline. More details here:
Actions not appearing on timeline
I had a similar problem, but everything was actually working correctly. If you get a returned ID and your article appears in your RECENT ACTIVITY, then all should be good.
The perceived issue, your post not appearing in your timeline, is actually the correct behavior. Your post doesn't appear in your timeline because it should appear in your friends' timeline as an activity that you completed. Once they comment or like it, then it should reappear on your timeline.
For me the issue was the posts doesn't show on timeline for all users except me also it was public !, i fixed it by make turn on application as online to be available to all users