Does facebook support oEmbed? - facebook

Anyone know whether Facebook supports oEmbed for embedding videos (or other media) when a link is shared. I googled but cant get a definitive answer for this.
My question Facebook developer forum has no answer. http://forum.developers.facebook.net/viewtopic.php?pid=334549

Yes Facebook supports oembed. You can checkout the documentation here..
https://developers.facebook.com/docs/plugins/oembed-endpoints
Note: In order to make this API work properly with ajax calls on mobile devices; You need to use the endpoint domain "apps.facebook.com" instead of "www.facebook.com":
https://apps.facebook.com/plugins/post/oembed.json/?url={content-url}
This is because if you use the endpoint that is provided in the official documentation "www.facebook.com" the User agent of the mobile devices will force the redirect to "m.facebook.com" which does not have this endpoint implemented.

Embedly is paid. Free alternative is Noembed. :)

No, there is no current support for oEmbed. You have two options (maybe more, but two that I know of):
Embedly http://embed.ly/
Engineer yourself an embedding solution for Facebook using the standard form of Facebook video embeds, eg:
http://www.facebook.com/photo.php?v=VIDEOID&set=t.SOMENUMBER&type=2
becomes
<object width="400" height="300" ><param name="allowfullscreen" value="true" /><param name="movie" value="http://www.facebook.com/v/VIDEOID" /><embed src="http://www.facebook.com/v/VIDEOID" type="application/x-shockwave-flash" allowfullscreen="true" width="400" height="300"></embed></object>

The support is drastically changing in late 2020, to prevent anonymous access, and instead require a developer account and access token. https://developers.facebook.com/docs/plugins/oembed

Yes it does, but has few hiccups when implementing. I'd recommend you to try solution I wrote to overcome this: https://shobhitsharma.github.io/embedo

Related

Am I using the sharethis API correctly?

I have icons (custom branded facebook, twitter, pinterest etc.) on a website and I would like it to be easy for visitors to talk about blogposts on these various social media.
To do so, I have created a server-side function that outputs links that look like this:
<a target="_blank" href=http://rest.sharethis.com/share/sharer.php?destination=facebook&url=http%3A%2F%2Fsite.mydevelopmentserver.com&title=postname&pub_key=123456&access_key=123456"/>FACEBOOK LINK</a>
with equivalent links for the other social media links.
I do not load any sharethis scripts or interact with the sharethis api in any other way on my site, and this method seems to be working fine (the jury is still out on analytics)
My questions are:
a. Is there anything wrong with using sharethis in this way?
b.Is there a better way to do this that does not require me to have my access key visible in my links?
I think the answer to my questions are:
a. Yes, there is something wrong with using sharethis in this manner. Your access key will be visible to everyone.
b. Yes, there is a better way to do this. There is no need to access the API directly at all to customize your sharethis buttons. Just insert the normal sharethis script that you can generate here: http://sharethis.com/publishers/get-sharing-tools, then change the buttons' classes to st_[service]_custom (where service is the service you would like to access).
That is, put I put this in my header:
<script type="text/javascript" src="http://w.sharethis.com/button/buttons.js"></script>
<script type="text/javascript">stLight.options({publisher: "1234"});</script>
and this in the body:
<span class="st_pinterest_custom">Pinterest</span>
<span class="st_twitter_custom">Twitter</span>
<span class="st_facebook_custom">Facebook</span>
<span class="st_googleplus_custom">Google</span>
<span class="st_stumbleupon_custom">Stumble</span>
Then I just style the buttons using my own CSS.
Works like a charm, thanks sharethis!
Also, if anybody needs general help making things more complicated than they need to be, ask me -- I can do it for you in a jiffy!
I think the answers to my questions are:
a. Yes, there is something wrong with using sharethis in this manner. My access key will be visible to everyone.
b. Yes, there is a better way to do this. There is no need to access the API directly at all to customize your sharethis buttons. Just insert the normal sharethis script that you can generate here: http://sharethis.com/publishers/get-sharing-tools, then change the buttons' classes to st_[service]_custom (where service is the service you would like to access).
That is, put I put this in my header:
stLight.options({publisher: "1234"});
and this in the body:
Pinterest
Twitter
Facebook
Google
Stumble

How to add a flash game to my facebook APP

I tried adding a flash game to my APP.
I looked on the (terrible) facebook developer website. All I found was this page:
http://www.google.be/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&ved=0CCcQFjAA&url=http%3A%2F%2Fdevelopers.facebook.com%2Fdocs%2Freference%2Ffbml%2Fswf%2F&ei=e-CXT4SAMMfpOamGqb8G&usg=AFQjCNGCKaCIDbWs0PrItofyEIlR4MSasg
But it says this will be legacy code and I should use a new method... I have no clue what that method is or where I can find it.
I tried these lines:
<embed type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" src="http://mywebsite.com/game.swf" />
and
<fb:swf swfsrc='http://mywebsite.com/game.swf' imgsrc='http://www.myurl.com/myflash.jpg' width='400′ height='300′ />
both failed... I'm desperate here, please help!
Just create an iframe application. That means create a page for your flash game to run on its own and then just point the iframe app to that url
Do exacly as on http://ugamesfree.com
Create a canvas app on facebook.
But remember, you need to have a SSL certificate to use iframes and redirects.

Meaning of referer param fb_source=games_ego

I see many people coming to my facebook game with HTTP referer that includes
fb_source=games_ego
Previously all options were at
http://fbdevwiki.com/index.php?title=Ref&cb=7347
but "games_ego" is something new.
What could it mean?
It's new section "Discover New Games" in the right block which is shown only in games.
Official Facebook documentation:
https://developers.facebook.com/docs/games/services/measurement#referraltracking
I don't know if they just changed it, but I only see "fb_source=ego". I updated the wiki.
Also, on the wiki there's a link to where Facebook has documented the possible values.

Facebook Registration PLugin question

I'm working on using the fb registration plugin on my sites. Sometimes a site doesn't support iframes. Is there another version of this script below that works without iframes or is there a workaround?
<iframe src="https://www.facebook.com/plugins/registration.php?
client_id=113869198637480&
redirect_uri=https%3A%2F%2Fdevelopers.facebook.com%2Ftools%2Fecho%2F&
fields=name,birthday,gender,location,email"
scrolling="auto"
frameborder="no"
style="border:none"
allowTransparency="true"
width="100%"
height="330">
</iframe>
thanks for any help
I don't understand what you mean by the idea that a site 'doesn't support iframes', but to answer your question, the Registration plugin is only available as an iFrame and i'm not aware of any other way to use it.
There's no reason you couldn't implement the Registration plugin's functionality yourself using the regular APIs if you needed to for some reason. The registration plugin just optimises a particular use-case ('sign up for a site with the possibility of using Facebook account information') and makes it faster to implement.
Yes there is. You can use the XFBML version of the plugin. This allows you to not only do what you are asking but to validate custom fields. This is what I choose to use on my application. However, I am not sure if fb is going to deprecate this or not come Jan 1st. Considering there is no replacement, it would be a little messed up if they did. For information on how to use and implement this see this link:
http://developers.facebook.com/docs/plugins/registration/advanced/
Brandon

Adding a Google Plus (one or share) link to an email newsletter

I am trying to find a way to embed a share/+1 link for Google+ in a Newsletter, much like the Facebook share and tweeter tweet links can be embedded in a newsletter, which can be achieved with the following two urls:
https://www.facebook.com/sharer.php?u=[URL]&t=[TEXT]
http://twitter.com/intent/tweet?source=sharethiscom&text=[TEXT]&url=[URL]
Is there a similar functionality available for Google Plus?
All I could find on my own, is the Google+ button, which unfortunately uses JavaScript and thus it cannot be used in an email newsletter. I would expect Google to provide a static url fallback, but I cannot find it anywhere.
https://plus.google.com/share?url=http%3A%2F%2Fexample.com
You can share the link on Google+ with the official Google+ share link.
Replace the url parameter with the URL encoded link you want to share.
This one works fine for me :
https://plus.google.com/share?url=your-page-url
The share link allows you to do this. It will work in an email, but it's not quite the same as the +1 button.
To use the share link, add a link element to your email that complies with the Google+ Buttons policy. Set the href attribute to https://plus.google.com/share?url={url encoded share target}
For example, linking to https://plus.google.com/share?url=http%3A%2F%2Fexample.com will allow you to share example.com on Google+: (yes, that is a working demo).
Check out the official docs for more info.
If you use this approach please be aware of the fact that it is not a direct replacement for the +1 button. The link shares the target URL on Google+, but it does not actually +1 the target page. Only the +1 button can +1 a page.
Solution for those who needs custom title, description and image. You should make following changes to target URL:
Step1. add itemscope itemtype="http://schema.org/LocalBusiness" into <html> tag. It will look like <html itemscope itemtype="http://schema.org/LocalBusiness">. More itemtypes here
Step2. Place the follwing meta tags into <head>, change content attributes according your needs:
<meta itemprop="name" content="{Custom title goes here}">
<meta itemprop="description" content="{Custom description goes here}">
<meta itemprop="image" content="{http://www.your_url.com/your_image.png}">
Step3. Add the following link to your newsletter or anywhere you want:
Share it
Tip. To check how google sees your page, you can use this tool http://www.google.com/webmasters/tools/richsnippets. Probably you'll be interested in section Extracted rich snippet data from the page
Good luck, Lauris
I'm using the following.. :)
https://m.google.com/app/plus/x/?v=compose&content=[TEXT]%20[URL]
I personally suggest Google Plus Interactive Posts button
https://developers.google.com/+/web/share/interactive
to use in your apps/websites.Here Google Plus allows many customizations to do according to the requirement. I have used it in my app. Its a better option than Share button.
Maybe this helps. It works (partially) for me.
http://www.stateofsearch.com/share-on-google-plus-any-website/
There has got to be a way to do this by hacking the +1 script.
If you are interested in just changing the apperance you should download and modify this to suit your requirements.
Then, add this to your css:
.Uu .KF {
background: url("your-replacement-image") no-repeat scroll -132px -21px transparent !important;
}
to override the Google icons. However, this is probably very unstable and subject to change.