facebook-javascript-sdk

Notification for facebook app requests not showing up

二次信任 提交于 2019-12-06 04:06:07
问题 I created an application for a website and gave it a site url. (The site url is actually not real. It is overridden in my local hostname file for development purposes. Does this matter?). I used the sample code for creating a request dialog to send requests to another facebook account. I used the multi-user interface, without the to: field. When I refresh the page in my other facebook account, I see a red 1 on the world icon for just a split second, but then it disappears and there is no

Firefox Only: FB.login() called before FB.init()

早过忘川 提交于 2019-12-06 01:45:49
问题 Using the Facebook SDK, I get the following console error when trying to connect a user to my site. The "Connect with Facebook" button works fine in all other browsers, except Firefox. I have a Channel URL in the innit config, and I've confirmed this issue happens in Firefox installs without Firebug. The following is my code: <script type="text/javascript"> window.fbAsyncInit = function() { FB.init({ appId : 'my_real_app_id', channelUrl : 'MYURL.com/channel.php', status: true, cookie: true,

how to detect after FB authentication and before FB authorization

守給你的承諾、 提交于 2019-12-06 01:39:31
In my MVC application, I have below code in JQuery to check if user is connected to Facebook app or not FB.login(function (response) { switch (response.status) { case "connected": case "unknown": break; } }, { scope: "@MyPermissions" }); Now, when I do FB login through my app, it authenticates and immediately starts FB app authorization and finally it comes to Connected case, when authorization is done. My Question is : Can I detect when Facebook authentication in done and before authorization starts ? So that my debugger can catch the position before authorization takes place. I have to

getLoginStatus returns status unknown when trying to logout from Facebook using Facebook JS SDK

白昼怎懂夜的黑 提交于 2019-12-06 01:16:33
问题 I have a localhost website, where I've implemented login via Facebook using Facebook C# SDK. Startup configuration class : public class ExternalLoginConfig { public void ConfigureAuth(IAppBuilder app) { app.UseExternalSignInCookie(DefaultAuthenticationTypes.ExternalCookie); var facebookAuthenticationOptions = new FacebookAuthenticationOptions() { AppId = ConfigSettings.FacebookAppId, AppSecret = ConfigSettings.FacebookAppSecret, Scope = { "email" }, Provider = new

JS SDK vs. PHP SDK

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-06 00:43:56
问题 From my brief exploration around various websites, it seems that the JS SDK is much more commonly used than the PHP SDK. Even sites that are implemented in PHP use the JS SDK. The PHP reference page has 776 likes, whereas the JS reference page has 20k+ likes. The PHP reference page says the PHP SDK helps you add Facebook Login to your page, but even the Login Button uses the JS SDK. Does the PHP SDK actually have any advantage at all? Why so little effort is being put into the PHP SDK? 回答1:

Facebook login onClick - Javascript

这一生的挚爱 提交于 2019-12-06 00:35:17
I have this code on my website. The facebook login dialog is being shown when my page has loaded and not when the user has click on an anchor tag. <script> // Additional JS functions here window.fbAsyncInit = function() { FB.init({ appId : 'xxxxxxxxxxxxxx', // App ID channelUrl : '//192.168.1.127/test/channel.html', // Channel File status : true, // check login status cookie : true, // enable cookies to allow the server to access the session xfbml : true // parse XFBML }); // Additional init code here FB.getLoginStatus(function(response) { if (response.status === 'connected') { // connected }

Access Facebook Session using PHP

谁都会走 提交于 2019-12-05 23:17:19
I am struggling to keep the Facebook session alive using PHP on my website. I use both the JavaScript SDK and the PHP SDK to form the basis of my app. The problem I am having is that when the "Facebook session" ends, my PHP script believes that you are logged out of Facebook. But, as soon as I call the FB.init() using the JavaScript SDK, the session comes back to life. Is there anyway to achieve the same using the PHP SDK? Or can I set a custom expiry time on the Facebook session? Extracted from comments It seems that the session expire time is set to 2 hours but I am not certain about this. I

JS SDK getLoginStatus doesn't return userID nor signedRequest

社会主义新天地 提交于 2019-12-05 22:50:22
I'm using PhoneGap/Cordova with the facebook plugin. Everything seems to work except for getLoginStatus who is not working as defined here and here . When called, it returns some data, but not all: it doesn't return userID nor signedRequest. Here is the code: FB.getLoginStatus(function(response) { if (response.status == 'connected') { var fb_uid = response.authResponse.userID; var fb_signedRequest = response.authResponse.signedRequest; alert('logged in'); } else { alert('not logged in'); } }); userID is filled with ellipsis (...), while signedRequest is undefined. I managed to get userID with

How to implement facebook comment plugin in Android

送分小仙女□ 提交于 2019-12-05 21:06:36
How to implement Facebook comments plugin in Android, which allows users to post comments to their wall as shown in the image given below ? noobie artist maybe this is not what you looking for but i found few ideas that you could start rolling from like there is a Graph API Facebook social plugin on android or in a WebView Android unable to implement facebook comment in a webview due to default browser Edit: Should work if you set proper domain and path that already has comments. Haven't checked how it will if original path doesn't have comments package com.example.ff; import android

The channel file and CDN

北城余情 提交于 2019-12-05 21:03:28
My main javascript (and so all the static content) is included from https://static.anuary.com . The URL that user is browsing is https://dev.anuary.com/somepath/ . Where does the channel file need to be, dev.anuary.com or static.anuary.com ? At the moment it is http://static.anuary.com/channel.html . I am asking because I am still getting the error that says: Unsafe JavaScript attempt to access frame with URL https://www.facebook.com/dialog/oauth?access_token=[..]&api_key=[..]&app_id=[..]&client_id=[..]&display=popup&domain=dev.anuary.com&locale=en_US&origin=1&redirect_uri=http%3A%2F%2Fstatic