Facebook like button for a facebook status - javascript

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.

Related

Facebook Like, Comment and Share links via API feed

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.

get all posts posted in my facebook page and show it to my website

I am trying to fetch all the posts posted on my page and show it on my website. Is it possible? if yes how?
I know that facebook provides embed functionality where you put the post URL and it generates and embed URL for you? but I m looking for something more dynamic where whenever my page loads I get all the posts from my page.
Please bear with me if something is wrong above.
Sounds like something the Facebook API could achieve.
Graph API:
https://developers.facebook.com/docs/graph-api
User Feed Endpoint:
https://developers.facebook.com/docs/graph-api/reference/v2.5/user/feed

HTML / JavaScript - Post message on facebook wall from my web

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/

how to use Facebook share button in my web page to share or post something to facebook page?

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)

How to tweet from a local webpage

I made a webpage that I open in my browser that uses Javascript to help me construct what I want to send on twitter. Then I have to copy and paste the text into a Twitter client in order to actually send it.
I would like to just have a button that I press on my page that will send the tweet instead of doing this. Is it possible? I've been looking at jsOAuth and it seems I need things like a consumer key and secret? I don't have those things. This isn't a public app, it's just something I'm making for my own personal use.
How can this be done?
You can do this with a regular tweet button. You can provide the text that you want to tweet about. Normally you would think this is for public use, but I've found it very useful for an admin section. Here is the link to the twitter dev page:
https://dev.twitter.com/docs/tweet-button
AFAIK OAuth requires a site to redirect to, also for cookie purposes.
There is something called OAuth for devices that let's you authenticate the application instead of the browser/client. Facebook supports it, Iam not sure if twitter does it too.
hth

Categories

Resources