facebook-javascript-sdk

does facebook embedded video api still support removeListener()?

十年热恋 提交于 2019-12-06 08:26:40
According to facebook documentation - https://developers.facebook.com/docs/plugins/embedded-video-player/api , we subscribe to player events var handleDesktopEvents = function (msg) { if (msg.type === 'video') { var player = msg.instance; var playHandler = player.subscribe('startedPlaying', function() { // Video started playing ... player.unmute(); console.log('detected video playing'); ga_virtual_pagehit(msg.id); console.log('sent event to GA'); playHandler.removeListener('startedPlaying'); // playHandler.release(); }); console.log('detected video ready'); player.play(); FB.Event.unsubscribe(

Facebook Login from subdomains (too many “Valid OAuth redirect URIs”)

左心房为你撑大大i 提交于 2019-12-06 08:22:20
I've faced with the following problem: I'm using Facebook js sdk for the login process. In App settings Site URL is set to " http://example.com/ " , App Domains are "example.com, www.example.com" . In Facebook Login Settings "Valid OAuth redirect URIs" are " http://example.com/ , http://www.example.com/ " . From the main domain it works just fine, but under subdomain (e.g. http://subdomain.example.com/ ) i get the following error: "URL Blocked: This redirect failed because the redirect URI is not whitelisted in the app’s Client OAuth Settings. Make sure Client and Web OAuth Login are on and

Google Chrome Frame and Facebook Javascript SDK - Cannot login

孤街醉人 提交于 2019-12-06 07:22:18
On the example below i have an html page with the javascript code needed to login to facebook. On the i have the Google Chrome Frame meta tag that makes the page run with google chrome frame. If you open this page with any browser the finish() callback runs normally. If you open it with Google Chrome Frame it never fires. So this means that every Facebook App that tries to login to gather user data cannot login. This happens if the page is opened with google frame. But even if i remove the meta tag so that the page can open with IE8 the page opens again with google chrome frame because

getLoginStatus not firing with calling from FB canvas

て烟熏妆下的殇ゞ 提交于 2019-12-06 06:45:22
问题 Attempting a client site authorization, and attempting to run within a canvas. If I access the my website directly http://mysite.com/ everything works. If I try to run via canvas https://apps.facebook.com/myapp it runs but getLoginStatus does not fire at all. var curLoc = window.location; FB.init({ appId: 'xxxxxxxxxxxxxxx', // App ID channelUrl: curLoc.protocol + "//" + curLoc.hostname + ":" + curLoc.port + "/channel.html", cookie: true, // enable cookies to allow the server to access the

Unable to load full Facebook comment plugins inside an iOS UIWebView

不想你离开。 提交于 2019-12-06 05:57:58
问题 I have a simple ViewController to load FB comments plugins inside a UIWebView @implementation ViewController - (void)viewDidLoad { [super viewDidLoad]; UIWebView * webView = [[UIWebView alloc] initWithFrame:CGRectMake(0, 0, 320.0f, 1505.0f)]; NSString * html = @"\ <!DOCTYPE html>\ <html xmlns:fb='http://ogp.me/ns/fb#'>\ <head>\ <meta name='viewport' content='width=device-width, initial-scale=1.0'>\ </head>\ <body style='background-color:red;'>\ \ <div id='fb-root'></div>\ <script>(function(d,

FB.ui Facebook share doesn't work on posts?

断了今生、忘了曾经 提交于 2019-12-06 05:50:45
When I call the action, FB.ui({ method: 'share', // this works fine href: 'https://www.facebook.com/' // this works fine href: 'https://www.facebook.com/678506978/' // this doesn't href: 'https://www.facebook.com/678506978/posts/10152685321776979' }); More specifically, the window pops up alright, but it's just a blank share window, with nothing beneath to show what I'm sharing. And after I clicked Post to Facebook , it doesn't appear in my timeline, unlike the former two. My question: how to make sharing a post work? In the end I had to make use of the supposedly deprecated feed action : FB

Facebook login to existing user database, and access tokens

感情迁移 提交于 2019-12-06 05:16:43
问题 Trying to add facebook login to an existing login system on a project I am working on. Built with angular, using the FB JS SDK. This is primarily to allow frictionless login, and not currently that fussed about using the access tokens to make further calls with the FB API. So as a new user, they hit the FB login, accept permissions etc, and it fires me back an access token etc. The new user is created in my DB, along with the accesstoken , FB userid , etc. How do I now authenticate the user

How bad is publishing the app secret really?

橙三吉。 提交于 2019-12-06 05:03:49
问题 After significant voodoo, I have finally got the scores API working. Turns out you have to set Enhanced Auth Dialog to disabled or Facebook ignores your publish_actions permission. Just a heads up in case anyone else is struggling. However, I'm working entirely in the Javascript API. No server-side scripting is available. The only way to publish a score is with an app access token. The only way to get one of them is to use the app secret, and that would have to be in the javascript code for

Facebook share with custom parameters with API version 2.9

杀马特。学长 韩版系。学妹 提交于 2019-12-06 04:26:37
问题 I need to share a result of a quiz on facebook containing a custom title, picture and description. Wich worked perfect before update to version 2.9 on April 18 . But it isn't working with Version 2.9. So am I missing out something there? Or does Facebook don't want us to share custom Facebook Feeds of our websites in 2017? For my Setup for a test facebook feed I coded strictly with Facebook Developers Documentation. Facebook Changelog v2.9 says parameter picture, name, description and caption

Facebook API - How to add application to group in developer mode

前提是你 提交于 2019-12-06 04:06:57
I have troubles with adding my application to group for any test user. I've created two test users and one of them has group and he is an admin there and I wrapped those users into test application. I've added two permissions for groups (groups_access_member_info, publish_to_groups). In user settings I see my application but in group settings I can't add my application. I need this because I would like to make request from facebook graph API. Regards In order to test the Groups API with an app in development mode, you need to be an admin of both the app and group. Test users don't count as