How to do a Facebook Video Embed Whitelist Request? - facebook

I need to post a swf on user wall and it is able to play inside the wall.
I searched the solution for few days and understand that I need to apply a facebook video embed whitelist request in order to do it. However the old request form link doesnt work (http://www.facebook.com/help/contact.php?show_form=video_embed_whitelist).
Anyone can help?

If you try writing something in the Facebook pop-up that comes up and then publish it to feed, the video would play there on the wall itself when the thumbnail is clicked.
If the feed doesn't have a message, the thumbnail becomes a direct link to the SWF itself and opens up in a new window.

You don't need to apply for any whitelist request for this. Any feed story can contain an SWF in it. Please see the Facebook JavaScript SDK for information about what elements you can post within a feed story. One parameter that you can use is the source parameter.
Taken from the documentation :
source:
The URL of a media file (e.g., a SWF or video file) attached
to this post. If both source and picture are specified, only source is
used.
so... for example - you could make a call with these parameters :
var obj = {
method: 'feed',
link: 'http://your_site.com/',
source: 'http://your_site.com/your_swf_movie.swf',
name: 'Publish SWF in feed!',
caption: 'SWF's are cool',
description: 'Here is an SWF file!.'
};
FB.ui(obj);

If your site is in the white list, the swf may play directly on the wall, otherwise it will pop up a new window to play the swf.

Related

Dynamic URL in Open Graph og:url

I need to publish a MP4 video on Facebook using OpenGraph.
I've created a dynamic page that gets the ID of the video and generates meta tag according to selected id.
If i insert the url like http://site/video/ID inside the Facebook sharing debugger (https://developers.facebook.com/tools/debug/), the video is shared correctly with image preview and video player.
If i put a new id i get "This URL hasn't been shared on Facebook before." and preview does not work.
I don't think it makes sense to force Facebook to crawl for every ID, there must be a better way to do it.
Can anyone help me?

Unity facebook SDK, can not post picture with FB.Feed

In my Unity IOS game, I am unsuccessfully trying to use FB.Feed to share a screenshot on the user's wall.
Facebook documentation uses FB.Api to publish the screenshot, but this method does not display a share dialog, it simply uploads the pic to Facebook.
Answers I have found so far:
Upload the picture using FB.Api, and then parse the FBResult for the picture URL, and feed that to FB.Feed Link to answer.
This method triggers an error, since it is not possible to use a Facebook URL as source for a picture.
Save the picture locally and prepend "File://" to the picture path. Link to question. This does not seem to work either, and the Facebook documentation does not seem to have any information on URL formatting.
My question:
Is this the correct (and only) way to display a share dialog when publishing a picture? Or am I looking in the wrong direction?
FB.Feed only allows you to post link to images. It doesn't upload the images to Facebook. Therefore, these images need to hosted somewhere on the net and not locally.
The best way to make it work is either upload the images to FB (with privacy property set to EVERYONE) using FB.API, and then share the link to that picture via FB.Feed. If you don't want to create duplicate stories, i.e. one from posting the picture and another from FB.Feed, make sure that you set no_story to true.

Controlling size of swf posted to Facebook with feed dialog

There are three ways to post a swf to facebook, in the first two I can control the size of the swf, but can't figure out how to do it with the feed dialog. Is there a way to do it?
Adding og:video:width and og:video:height tags to page and either entering url in status or going to old share url, can post swf up to 398x398.
With API posting to /me/feed adding width and height parameters can post a swf up to 398x398.
Using feed dialog (https://developers.facebook.com/docs/reference/dialogs/feed/) it seems there is no way to control the size, the swf always displays 398x224.
I would really like to use the feed dialog but be able to control the size.
3) Should be possible using the same og:video:width and og:video:height tags on the link you're sharing.
When attaching an SWF to an open graph page, the correct way to control the size of the SWF is by specifying the og:video:width and og:video:height open graph tags: https://developers.facebook.com/docs/opengraphprotocol/#audiovideo
These sizes will be respected when posting this page in a status update, or when specifying it via the 'link' property when invoking the Feed Dialog or making Graph API posts to /me/feed.
Never did find a way to control the size for a swf posted via the feed dialog, so I opened bug:
https://developers.facebook.com/bugs/308822549198711

Publish app wall share option

I have read a guide for publish link to my wall or my fan page. Here is the guide: net.tutsplus.com/tutorials/php/wrangling-with-the-facebook-graph-api/
This is my application test:
http://www.onlyimagination.com/mytest/source/
The application works, but i don't want GENERATE the link manually, i want only SHARE.
This is the screenshot of the publish of this app
Instead I would just put the link and my application AUTOMATICALLY extracts all the links like this sharing of information here in this screenshot.
The info presented in the 2nd screenshot is just the info of the picture that facebook has.
In order to tell facebook how to present your links you need to use the Open Graph protocol (you can also use the Open Graph docs).
With this protocol you define properties which facebook knows how to extract, such as title, type, image and more.
This means that the response for every link you want people to share on facebook should contain the og meta tags.
Edit
Sorry, did not think about adding this before:
You can use the Debugger tool to see how facebook "sees" urls.
You see, what happens when a user shares a link is that facebook has a program that send a request for the shared link, it then parses the response and search for specific tags to extract the data which is then presented to the user.
For example, try the Debugger for google.com and see what info was extracted, then try to share it and see that it uses the same info.
Also, at the bottom of the Debugger result, there's a link Scraped URL: See exactly what our scraper sees for your URL if you click that you see the actual response.
Hope this clarifies it.
2nd Edit
I don't know how you publish your posts in your app (next time it could be easier if you just add the code you use), but it doesn't matter how you publish it (js sdk or from the server side) you always have two options:
Post a link that has the og meta tags in it, those will tell facebook how to display the link
Add the link, picture, name, caption and description fields when posting (js sdk for client and graph api for server)

Publishing an swf to Facebook wall - how to pass custom param?

I would like to post a flash item to my wall from my iPhone app.
The swf is displayed on my wall, but unfortunalty I didn't found how to pass it a custom variable, like songUrl.
Do you have an idea ?
Thanks
The only way you can pass parameters to your SWF which is embedded in a Facebook Wall post is to embed values in the parameter of your SWF.
Assuming you're using Facebook Connect to publish to the Wall, the URL to your SWF must include any custom variables you'd like to pass to it, e.g.
http://...myflashfile.swf?myvar1=foo&myvar2=bar
Now in your Actionscript code (assuming you've got a Flex project), you'll do
FlexGlobals.topLevelApplication.parameters.myvar1
to get the value of myvar1.
References:
http://www.permadi.com/tutorial/flashQueryString/ (for Flash)
http://www.permadi.com/tutorial/flashQueryString/indexAs3.html (for Actionscript/Flex)