I have added a facebook share link to my sharepoint site using:
<a name="fb_share"></a>
<script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share"
type="text/javascript">
</script>
I have added the script to the masterpage and the link to the page layout. I all works fine apart from that when a new page is created using the masterpage with the script some of the editong tools are disabled. For example the Format and Markup Style Menus are disabled. Can this be problem be solved?
You might want to take a look at this link :
https://developers.facebook.com/docs/plugins/
It contains all the official Facebook plugins that you can embed into your site. In your case you should look in specific at the Send Button.
The Send Button allows users to easily send content to their friends.
People will have the option to send your URL in a message to their
Facebook friends, to the group wall of one of their Facebook groups,
and as an email to any email address. While the Like Button allows
users to share content with all of their friends, the Send Button
allows them to send a private message to just a few friends.
The message will include a link to the URL specified in the send
button, along with a title, image, and short description of the link.
You can specify what is shown for the title, image, and description by
using Open Graph meta tags.
It is very easy to implement these plugins - usually a case of "copy-and-paste". It looks to me that you have been using an outdated method of the Facebook share feature.
Related
The original method for sharing links with a custom image, text and link appears to have been stripped from Facebook. I for one would love to see them bring this back.
Here is my situtation. I have a Facebook tab that loads a page that is hosted under my hosteddomains.com. I setup a Facebook app to work with my Facebook tab. When I try to use the new "Share Dialog" if the link I want to share is not the same as the app domains then i get an error and I can't share the link. Am I doing something wrong or is this what they intended to do?
IF that's what they intended to do then there is no way that this will replace what sharer.php could do. I could be on any site and share any link with an image to Facebook and have it posted to my wall.
The question is if i am on facebook tab and i want to share a link (I want a dialog box with a custom photo, title, link, and summary) and allow my users to post this custom message to there Facebook status.
Maybe i am confused about how to accomplish this, but so far i am not having much luck.
I miss the good ole days when i could just construct a URL and that would give me the ability to share what i want to share. Twitter and Pinterest have these methods.
Here are some code examples of things that I've tried that did not work:
Option #1:
The url in this option goes to page that I created on hosteddomains.com that has the Open Graph Meta Tags in it. My idea was to share these pages from my server that will direct them back to my Facebook tab. The result I was getting from this method was seeing the title of the tab from my FB page and description. The reason turned out to be that if i set the og:url to my Facebook tab page, that's the page that would get scraped. That's not what i was expecting from this method. I thought it would take the meta tags from the page i shared and the url with it. Not take all of the info from url and ignore the meta tags.
<a href="https://www.facebook.com/sharer/sharer.php?u=[URL]"
target="_parent">SHARE ON FB</a></p>
Option #2:
Tried using Facebook Share Dialog. I had an interesting time with this one. I setup a new Facebook app. I tried the Facebook tab as the URL and also my custom url to the page that has custom open graph meta tags. The facebook app has two App Domains - hosteddomain.com and websiteA.com. I also created a Page Tab section. The page tab section loads the HTML page that was loaded in the tab we made for our facebook page. Issue with this method is I don't get a custom open graph options set from my php page. I'm picking up information from the facebook tab again. At least now the dialog box shows the name of the new app. I am limited in what i can share using this method. The url i share has to belong to the App Domains. In order to have multiple app domains, I had to make that Page Tab section and then add the second url to the App Domains field, otherwise i got a warning.
<a href="https://www.facebook.com/dialog/share?app_id=[appID]&display=popup&href=[url]
&redirect_uri=[url]&ref=s" target="_blank">SHARE THIS</a>
Option #3
The last thing I tried was the fb-share-button using the Javascript SDK. I get the same result as option #1. I don't think there is much difference between these two. Option 3 here is a bit easier to deal with and cleaner code. In this example, the url is to my custom page on hosteddomains.com that has my custom open graph meta tags. That doesnt seem to matter though. It still pulls the info from the og:url meta tag. I tried removing the og:url meta tag. I get the same result. Is it the Page Tab info interfering?
<div class="fb-share-button" data-href="[url]"></div>
I added the facebook share button within an email body (.htm). The purpose of the button is to share the photo a user received in his email. When the button is clicked, a new tab opens with the "Write a message" area to share on facebook.
The problem is that once "Share Link" button is clicked nothing happens - no confirmation, no redirect, BUT the link is actually posted on Facebook (so the end user would not know the message has been shared unless they check their Facebook while all confused). Here is the code for the button:
<a title="Share this photo"
href="http://www.facebook.com/sharer.php?
s=100
&p[url]=%PHOTO_LINK%.jpg (dynamically populated link)
&p[title]=Check out my pic!"
target="_blank">
<img src="someplace.png"
alt="Share on Facebook" height="50" width="50" />
</a>
I have tried using meta tags (title/description/url and the main namespace tag), but they are not picked up when shared (title/description is a bunch of random characters). Is this behaviour normal for share buttons of this sort, is it a bug or am I doing something wrong?
Thanks in advance
To fix this, put target="_blank" in the <a> tag.
You won't be able to share a photo within an email as it would mean sharing the URL to the email itself (which users won't have access to).
Instead, you should put the image on a website and use OpenGraph markup to give it a correct title, description, and thumbnail image. And then share the URL to this image on Facebook. You can still embed the image in the email, but the sharing and image need to be external from the email.
A lot has happened since 2012. There are now two API's a user may choose from when sharing on Facebook: 1) Sharer, and 2) Share Dialog.
Sharer: This will require confirmation of the user posting their content, and this will then get you what you want. However, Sharer only supports the url parameter now. There is basically no way to share any other parameter. Official Facebook Developer Docs: Share Button. And: Official Facebook Discontinuation of Sharer Non-URL Args Post.
Share Dialog: You will need to configure an App with Facebook, authenticate, and then to solve your problem, you'll want to set one of these params...
display : Set this to page (the default), or one of the other options, to determine how your share dialog displays.
redirect_uri : If you don't like how Facebook decides to interpret your display params, you can just redirect after sharing to some page on your site that says, "Post successfully shared! link to post" or some such.
Hope this helps someone.
I want a Like button on my web site that Likes my Facebook profile (rather than my web page), so that when a user clicks it they subscribe to my Facebook posts.
I've created the Like button using the tool at https://developers.facebook.com/docs/reference/plugins/like/
Further down that page there is an FAQ entry:
Can I link the Like button to my Facebook page?
Yes. Simply specify the URL of your Facebook page in the href
parameter of the button.
So, I've edited the href parameter to point to my Facebook page. eg:
https://www.facebook.com/myfacebookid
When a user clicks the Like button it has the desired effect. The user ends up having Liked my Facebook page. This is easily verified by the user going to my Facebook profile and checking that the Like button has changed to Liked.
But. When the user clicks the Like button, and entry appears in their News Feed with a generic Facebook description. ie:
Facebook is a social utility that connects people with friends and
others who work, study and live around them. People use Facebook to
keep up with friends, upload an unlimited number of photos, post links
and videos, and learn more about the people they meet.
I don't want a generic post about Facebook to appear. I want the description to relate to my Facebook account and/or web site.
Normally, I could modify this behavior with the Opengraph og: description tag, but as the page in the href is a Facebook page and not my own, I can't control the Opengraph tags.
I'm pretty sure that this was working okay before I enabled timeline for my account, so maybe this is a timeline bug?
So, how do I add a Like button which a) Likes my Facebook profile rather than one of my own web pages, and b) Posts a description of my Facebook profile rather than give a generic Facbook description?
Are all your fields in the info part of your page filled in, and/or completed? I just tested your theory and it seemed to work as expected, only thing is I know all fields in "info" are filled it. Give that a try.
This may happen if you have filled invalid/incomplete/wrong og tags in past and later changed them. Facebook's cache creates problem sometime.
Try putting all the entries (i.e. all og tags) and then debug them here http://developers.facebook.com/tools/debug. This debugger gives a detailed info about the url with og tags and also clears the cache for you.
This should solve the problem.
You have 3 important fields that used on page opengraph: Name,Description,Profile Image.
They are used when some one post your link on Facebook, or Google or some else web service that handle opengraph.
Actually, the suggested answers currently do not work and there is an open bug / ticket on Facebook for it. Up to now, there's no fix.
The problem is that you can not use simply https://www.facebook.com/myfacebookid. You should copy and paste the exact page URL. If you have a low number of likes it would look something like https://www.facebook.com/pages/[YourPageName]/[Your page Id]/, and this is the URL that you should use at this point.
If it does not work, try also https://www.facebook.com/[YourPageName]/[Your page Id]/.
In short, copy-paste the URL, do not type it manually.
I'm trying to use the Facebook Send button on an external website to link users to a specific application (an instance of "MyTab") on my client's Facebook Fan page (the link to which looks something like:
https://www.facebook.com/ClientName?sk=app_XXX
I had no trouble embedding the send button on the external website, using the following code:
<div id="fb-root"></div>
<fb:send href="https://www.facebook.com/ClientName?sk=app_XXX"></fb:send>
The problem is, the URL is truncated to https://www.facebook.com/ClientName when it is successfully sent.
How can I preserve the entire link so that users are sent DIRECTLY to the application?
I've tried encoding the url using "urllib" but that didn't work.
I'm stumped!
This is due to OpenGraph meta tags in the URL you use are for Facebook Page, even for Page Tab they represent the page itself leading to link that differs from initial one you've provided.
You may create intermediate page that will handle redirection with javascript to Fanpage Tab Application and providing OpenGraph tags for content that will be displayed in message sent.
Is there anyway I can attach a link to a news feed (which was not created by my application)?
Lets say that I would like to create a "send a hug" application. So now when a user browse his news feeds he can see a link at the bottom of each news feed saying "send a hug to this person".
One way to create such an application is to display inside the IFrame of the application all of the user's news feeds through the API (and then I can add whatever I want). However, I would not like the user to enter the application tab each time he wants to send a hug, but to show it to him directly on his facebook's news feed page.
Thanks,
Meir
read this
Name Description Permissions Returns
link The link attached to this post Requires access_token string containing the URL
name The name of the link Requires access_token string