I'm working with Facebook website integration and what to show a customized Facebook share dialog when clicking the Facebook delivered share button.
So i basically want a Facebook share button to call a JavaScript invocing the FB.ui() onclick instead of showing the stock dialog.
Is this possible?
Feed and share Dialogs
I think this question also have make by other before this.. check it Run Twitter and Facebook Share Button Code After ListCtrl Update
Related
Is it possible to create share button for sharing posts only on FB page of the website?
Let's say that user is on some website, and wants to share blog post. User clicks on share button, and that post is shared on facebook page of that website?
So here, Stackoverflow you click on share button, and that link is shared on Stackoverflow's facebook page.
https://developers.facebook.com/docs/sharing/reference/share-dialog
Use the Share Dialog, it offers the option to "Share on a Page you Manage".
I have one button and I want to share the content on Facebook without opening Facebook dialogue box.
Present code works like:
Click on a button;
It opens Facebook share dialogue;
And again click on share from dialogue;
I want something like this: click on a button and it would be shared on Facebook.
https://developers.facebook.com/docs/graph-api/reference/v2.2/user/feed#publish
You would need to authorize the user with publish_actions to do that. You need to go through the Login Review process with that permission and the message parameter must be 100% user generated according to the platform policy.
A lot of things to consider, i´d just stick to the popup.
It seems that social buttons (Facebook,Google,Twitter) usually are put in an iframe. It seems I can isolate the social button by following the iframe source URL, for example a tweet button:
Follow this URL to see the tweet button
My question is: How do I put this button on my page? The reason I want it out of the Iframe is because I would like to click on it programmatically eg Jquery/javascript.
This is not possible by design, and besides that against the TOS of these services. You cannot post on an arbitrary user's facebook or twitter without their approval.
It used to be done this way:
<script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script>
<a type="button_count" share_url="http://google.pl" name="fb_share">Share this page on Your's wall</a>
And it used to generate a share button with text "Share this page on Your's wall" instead normal "Share". Since last update it doesnt work anymore.
Is there any posibillity to change the text on share button?
With Facebook JS SDK:
You now have to use the Feed Dialog, which is part of the Facebook JavaScript SDK.
Without Facebook JS SDK:
If you don't want to be bothered with their SDK, you can use this simple link instead:
Share this page on your wall
Here's what it'll look like if you're sharing Google.com with this link:
https://www.facebook.com/dialog/feed?app_id=140586622674265&link=http%3A%2F%2Fgoogle.com&name=Google&redirect_uri=http%3A%2F%2Fs7.addthis.com%2Fstatic%2Fpostshare%2Fc00.html
Also, please acknowledge these three things:
You need to replace [[URL]] and [[TITLE]] with a link to the page you want to share and its title (both url-encoded).
The Feed Dialog has to show from which Facebook app the post comes from. The app_id parameter in the URL above is the one from AddThis. Create a Facebook app and put its own id in the URL to use the name you want instead of "AddThis Sharing". You can keep the app_id from AddThis though, it works just fine.
The last parameter (redirect_uri) is the page where the user will be redirected after sharing. It's currently a page from AddThis with some JavaScript that will close the tab / window. That way, the dialog just disappears when it's not needed anymore. You don't have to change it either, works great.
I getting a link to a friends profile page using the Facebook JavaScript API. I now am trying to add it to a iframe in a jQuery UI dialog. I have:
$('<iframe src="https://www.facebook.com/profile.php?id=505818552"><p></p></iframe>').dialog();
However this displays a Facebook logo with a 'go to facebook' link in the jQuery dialog. I tried using load(url) before dialog() but it didn't work because of cross-domains.
I was wondering if Facebook disables this kind of thing?
Is there a way of getting it to open in a jQuery dialog?
We do not allow this. Instead, please create a Facebook App and get the user 505818552 to authorize your App.
Then you will be able to pull that user's friends list by querying
https://graph.facebook.com/505818552/friends?access_token=USER_ACCESS_TOKEN
Yes, FB disables being included in an iframe as seen in this live demo.