I've created a Facebook feed using the Graph API which simply displays a few of the latest posts from a Facebook Page.
I've also done the same with the Twitter API, and within those tweets displayed I have created Retweet, Reply and Favourite buttons using their Web Intents.
e.g.; https://twitter.com/intent/like?tweet_id=<?php echo $tweets[0]['id']; ?>
However, I'm struggling to find a way to do a similar thing with the Facebook feed. Simply a Comment, Like and Share button as above.
I'm aware Facebook provides it's own embeddable plugins/buttons but those are not what I'm looking for.
Facebook's own stuff is ugly and would not look great in the design. I'm looking for a URL or something that allows me to create my own buttons.
Is there a way to do so at all?
Thanks.
Related
I am facing an issue related to the yammer integration, want to share the articles to yammer.com from my web app and embed the comments of corresponding article to my web app.
I was able to publish & share the link to Yammer using JS SDK code as below,
yam.platform.yammerShareOpenPopup(options);
but it is not returning any feedId or threadId of the shared item.
/* Like to have this kind of API to get the FeedId and ThreadId of the post */
yam.platform.yammerShareOpenPopup(options).then((feedId,threadId)=>{
// lot of codes
});
How can I get the feed Id and thread Id after sharing the post, or Is there any REST API available to share and get the feedID/ThreadID?
I have searched many related Q&As and Yammer Docs, but bad luck I couldn't find any answers or APIs.
Please share your thoughts, any comments or links also be helpful.
Thank you.
When you post a message with the Yammer Share Button you don't get this information by design. It's connecting into what was originally the bookmarklet page for Yammer (/message/new). Only yam.platform.yammerShare() is the documented (read: supported) API.
If you want to post a message and get information back you need to make a direct call to the REST API. Try out posting messages from the Developer Center and you'll see something like the following:
You can see that you get back various pieces of metadata that you are looking for including Thread ID. The trade-off here is that the Share button is simple, but basic. With the REST API (using server-side code, or the JS SDK) you can have greater capabilities and control.
this question may sound stupid, but im getting frustrated from searching around, and i cant manage to do that:
I want to create a button on my web (not an applications if that matters), and when the user will click on it, it will post a dynamic message on his wall.
Do i have to use javascript SDK for it, or is there a simpler way?
Thanks!
You have to use Facebook Connect (Facebook SDK for Javascript).
Take a look at this:
https://developers.facebook.com/docs/javascript/quickstart/v2.2
But before use this API you need to create an APP ID in the Facebook developers page and use this ID to authenticate through OAuth:
https://developers.facebook.com/apps
This link also explains you how to use Facebook SDK with jQuery
https://developers.facebook.com/docs/javascript/howto/jquery
I hope it helps.
Edited:
If you want something really simple. You can use Social Plugins to allow the user share your website. But I'm not really sure if you want to post a custom message for the user.
https://developers.facebook.com/docs/plugins/share-button/
i am added a facebook share button to my website it is sharing or posting things to profile timelines but it is not sharing or posting anything to my page(like fans page in facebook).Is there anyway to choose to post to your fan page? any one can help me? plz..
Considering whatever is the "things" in your website, say a product with id 123, for example.
You can make users like it/share it using the standard fb-like button.
When they do like it and/or share it, it comes up as a thing they liked on your website. If that object of yours, has a proper URL with proper meta-tags, it will show up nicely on FB as a story. Good guide here
You can also use the facebook debug tool for testing if the sharing, meta tags are all working as expected here.
If you want your page to be the object of sharing, the only thing that can be done is users can like your page from your website. You cannot share stories from the API to the page, as the page is not an entity. Meaning its not a user.
So, if the page said,
User XYZ liked item ABC on yourwebsite.com
it won't make much sense to the people who see this.
Instead if userXYZ liked an itemABC on your site, the following update on FB will make much more sense.
UserXYZ liked itemABC on yourwebsite.com
(This will have a proper pictorial representation and a clickable link to your website if the like button and the destination url are configured correctly)
I've pulled some facebook statusses to my website and I would like to add a like-button to them. I can't seem to use the facebook like button generator. When trowing a url like this:
http://www.facebook.com/permalink.php?story_fbid=268577716517595&id=224519707563955 in the facebook url linter tool it sais it can't crawl itself.
Is there a way to fix this like-button? A way of custom coding a facebook like button? or is the only solution to redirect to this url?(Not an great option, i want the user to stay on my website)
I hope anybody has a solution for this.
You can perform an like of an object through the Graph API, but then the user have to authenticate your application.
See more under the like section here.
I would like to make a web page that aggregates social sites like Twitter, Facebook, and others however I have no idea if this is possible considering cross domain security issues. I've heard of JSONP but I've never used and don't know if that will work to get data from Twitter and Facebook.
Check out http://remysharp.com/2007/05/18/add-twitter-to-your-blog-step-by-step/ That shows a JS based solution to get a timeline just through javascript. I presume you can do something similar for facebook (?)
Neither Twitter nor Facebook provide JSONP.
You might be able do a javascript only aggregator site though using their javascript apis:
http://platform.twitter.com/js-api.html
http://developers.facebook.com/docs/reference/javascript/