facebook-javascript-sdk

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

删除回忆录丶 提交于 2019-12-04 06:54:44
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 FacebookAuthenticationProvider() { OnAuthenticated = context => { var accessToken = context.AccessToken; var facebookClient = new

How to verify a users facebook id when making ajax posts to php in facebook app

十年热恋 提交于 2019-12-04 06:49:26
问题 I am looking for a way to verify a users facebook id when posting user specific data using ajax. I want to be able to verify that a facebook user id is correct when posting data using ajax. The problem being, that if I post the facebook id as part of my ajax data, it can be edited in the javascript. I could make a graph call on the server side, but these are really slow, so I want to keep graph calls to a minimum. Preferably only calling it at the beginning. Can any suggest an efficient

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

荒凉一梦 提交于 2019-12-04 06:43:37
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, xfbml : false }); }; (function(d) { var js, id = 'facebook-jssdk', ref = d.getElementsByTagName('script'

JS SDK vs. PHP SDK

佐手、 提交于 2019-12-04 05:20:37
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? Well, the JS SDK is bound to be more popular. Not everyone develops their server side code in PHP, (could be

How to get user posts through facebook-sdk python api?

我只是一个虾纸丫 提交于 2019-12-04 05:12:25
I use facebook-jssdk to authorize my application for read access to user profile and user posts. FB.login( function(response) { }, {scope:'user_status,user_likes,user_photos,user_videos,user_questions,read_stream,user_posts'} ); Then I'm trying to receive user posts. import json from time import mktime from urllib import urlopen from facebook import GraphAPI from datetime import datetime ga = GraphAPI() access_token = ga.get_app_access_token(settings.FACEBOOK_APP_ID, settings.FACEBOOK_APP_SECRET) url = "https://graph.facebook.com/fql?q=SELECT+created_time+FROM+stream+ WHERE+source_id=%s+AND

Retrieve Facebook users who like a URL/web page

99封情书 提交于 2019-12-04 05:10:36
问题 How can I retrieve the list of Facebook users that have clicked the like button on an external site? Say I have a like button: <fb:like href="http://example.com/xyz"></fb:like> I'd like a list of FB user IDs of people who have liked it. I've tried OpenGraph: https://graph.facebook.com/OBJECTID/likes/ (where OBJECTID is the id of the like example.com/xyz) and FQL select user_id from like where object_id in ( select id from object_url where url = 'http://example.com/xyz')) but both return empty

FB.ui feed not giving a callback

天大地大妈咪最大 提交于 2019-12-04 03:37:22
问题 I am unable to get any feedback from my Facebook FB.UI() method. I am convinced that I am using it correctly, as the actual post does post to my wall, but the callback data is either missing or empty. I am using: FB.ui({ method: 'feed', name: 'asd', link: 'asd', picture: '', description: 'asd' }, function(response) { console.log(response); if(response.post_id) { $.post("ajax/wall.php",{wall : 1}); } else { } } ); 回答1: I am not sure how this resolved itself, but it did :) I cleared my cache

Facebook SDK FB.GetLoginStatus Load denied by X-Frame-Options (Firefox Only)

无人久伴 提交于 2019-12-04 03:31:47
问题 I have this web application login page that calls FB.GetLoginStatus() from the Facebook JavaScript SDK after the document is done loading. This worked perfectly fine on all browsers (mobile included) and that was the happily ever after. BUT, one day, out of plain nowhere, I notice that the SDK is failing to get the login status data of the Facebook user when the page is done loading. I take a look in the console and I see something around the lines of Load denied by X-Frame-Options [massive

FB API making insecure xd_arbiter.php requests in a secure page

只愿长相守 提交于 2019-12-04 03:22:27
I'm having trouble with a secure Facebook app page which the browser reports as containing insecure content. The insecure content seems to be one request to: http://static.ak.facebook.com/connect/xd_arbiter.php All subsequent calls from the FB API are going over https, though. I can't figure out what the problem is, since I'm loading all of my content securely, including the FB script: https://connect.facebook.net/en_US/all.js Any ideas? Update: Seems like it's Facebook's own mistake, and a fix is on the way: http://developers.facebook.com/bugs/303558613049120?browse=search

Using Facebook SDK in Angular 2

烈酒焚心 提交于 2019-12-04 02:24:45
I've been reading this: https://developers.facebook.com/docs/sharing/reference/share-dialog and I need to import the facebook SDK in order to use the following code: FB.ui({ method: 'share', href: 'https://developers.facebook.com/docs/', }, function(response){}); How I Can import the facebook SDK using Angular 2 app? After three days of research found solution for facebook sharing with dynamic content in index.html: <meta property="og:type" content="website" /> <meta name="fbDescription" property="og:description" content="desc"> <meta name="fbJobTitle" property="og:title" content="title">