When I am posting to my wall directly, then my friends have an option to "re-share" the post by clicking on "Share" link (last one in the list of actions: Like * Comment * Share). However, when I post from an application, there is no "Share" link and only Like and Comment actions are available.
Is there a way to change application or application preferences to enable direct re-sharing for posts from applications?
You can post a "Link" to User's wall with a "link"-field to the Original post like "http://www.facebook.com/{{$fb_id}}" and you can add a "message" to that as well.
UPD: for reSharing a "Picture" you either "generate" a link like "http://www.facebook.com/photo.php?fbid={{$fb_id}}" or request Picture via GraphAPI and use it's "link" field. this is valid for other FB-Graph-Types.
Here is how it is done In Graph API do this..
post me/feed
message : YOUR_MESSAGE
link : link to share
actions : {name: "share", link: "linktoshare"}
Refer these
https://developers.facebook.com/docs/reference/api/user/#posts
http://developers.facebook.com/docs/guides/mobile/#android
Related
I am currently attempting to retrieve all the posts on my Timeline via Facebook's Graph API. My Likes and Links and Posts appear to retrieve just fine, but posts from friends do not appear to be displaying.
For instance, a friend shared a link on my timeline, and that is currently not displaying in the returned data in my request to /me/feed.
I've tried turning on all permissions, but can't seem to get that particular post in my return data. Is there something obvious I'm overlooking?
Thank you for any assistance,
Michael
If a users permissions for a post are set to anything other than public if could be omitted from the result set.
Check the privacy for that missing post.
refer to: https://developers.facebook.com/docs/reference/api/privacy-parameter/
me/feed privacy: https://developers.facebook.com/tools/explorer/145634995501895/?method=GET&path=me%2Ffeed%3Ffields%3Dprivacy
Please test with Graph API explorer, https://developers.facebook.com/tools/explorer/?method=GET&path=me%2Ffeed, click "Get access token" button and tick "read_stream" check box under "Extended Permissions" tab. Then submit and proceed authentication process.
After authentication dialog done, click "Submit" and try to test to get the link shared by your friend. I've no problem to see this kind of feed. Of course, you can create a new account and behave as your friend for easier to test, otherwise you need go through pagination to get the target feed.
Hello people i am trying new action to post picture on facebook and during posting i am facing a error which i cant able to make it work properly
The action you're trying to publish is invalid because it does not specify any reference objects. At least one of the following properties must be specified:
for posting your action, with Javascript SDK for posting image you should try something like:
FB.api('/me/bhlolzspot:laugh_out_loud', 'post',
{ funniest_picture : 'OBJECT_URL',image[0][url]=http://www.yourdomain.com/images/image.jpg,image[0][user_generated]=true });
I am assuming laugh_out_loud is your action name and funniest_picture is your object name.
at OBJECT_URL, all your meta tags should be in place and i can see there is a missing og:image tag, there you should put the image you want to post with action on facebook.
hope it helps.
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
How do you post a like link without using Like Button plugin? and not shared a link and then like it.
I need a like posted after user confirm she want to post it to fb or not.
Is there a way?or I should shared a link and the like it?
What you're asking for is very simple. You can use the graph API to post to a user's feed the link. The API returns the ID of the post you just made. Then you can call the graph API to like that ID.