facebook-javascript-sdk

With 'picture' in Facebook's Feed Dialog deprecated how can I post an image link?

孤者浪人 提交于 2019-11-28 18:26:23
I've been using Facebook's Feed Dialog to let users on a site share content on their Facebook feed. On their feed there would be a picture that serves as a link to the page on my site, with some text below it (name, caption and description fields). All of these - picture, name, caption and description are now deprecated and stop working on July 17th. Is there any other way to achieve this functionality using a different method? You need to use the Open Graph actions method described at the bottom of this page here in the FB dev docs . Trigger a Share Dialog using the FB.ui function with the

How can I make the Facebook Like button's width automatically resize?

戏子无情 提交于 2019-11-28 18:14:33
I'm implementing the Facebook Like Button , but I'm running into some trouble with the width. I'm using the JavaScript SDK implementation, not the direct iframe. According to the documentation, the default width is 450 . That's fine, and I understand that the width can be changed by way of the width attribute on the <fb:like> tag. However, my problem is that I really cannot specify a fixed width. Due to the nature of the button, the width is not constant in all states. For example, if no one has liked the page yet it displays "Be the first of your friends to like this"; if someone has, it

How do you animate FB.Canvas.scrollTo?

佐手、 提交于 2019-11-28 18:01:20
I've created an app that is a set size (around 2,000 px tall) and have a menu that calls FB.Canvas.scrollTo in order to help the user navigate the long page. Is there any way to add a smooth scrolling effect? Facebook does not offer any solution on its developer blog. Dave Using @Jonny's method, you can do this a little more simply with function scrollTo(y){ FB.Canvas.getPageInfo(function(pageInfo){ $({y: pageInfo.scrollTop}).animate( {y: y}, {duration: 1000, step: function(offset){ FB.Canvas.scrollTo(0, offset); } }); }); } JonnyReeves Just had the same problem today - I came up with a little

How to securely authorize a user via Facebook's Javascript SDK

扶醉桌前 提交于 2019-11-28 17:29:51
I want to let users log in on my website using their Facebook ID without reloading the page. This is why I use Facebook Javascript SDK . This scheme describes the authorization flow with this SDK: At the end of the process I know that the user is logged in and I know their Facebook ID. I can then register them in my database via this ID, and let them use it to log in afterwards. However, this seems terribly insecure. In order to let my server-side script know the user's ID, I have to send it via AJAX. However, I have no way of knowing whether it's the owner of the ID who's trying to log in.

Passport.js: passport-facebook-token strategy, login through JS SDK and THEN authenticate passport?

与世无争的帅哥 提交于 2019-11-28 17:07:46
问题 I was looking for a way to let my client authorize with the facebook JS SDK and then somehow transfer this authorization to my node server (so it can verify requests with the fb graph api) I stumbled across: https://github.com/jaredhanson/passport-facebook/issues/26 & https://github.com/drudge/passport-facebook-token what seems to be an entirely different strategy from passport-facebook. Am I correct when assuming that: One logs in with the fb JS SDK, and then the facebook-token strategy

FB.login broken flow for iOS WebApp

浪子不回头ぞ 提交于 2019-11-28 16:54:37
I'm making an iOS Webapp (i.e. an HTML page that runs in standalone mode - none of the Safari chrome - when the bookmark of the page is added to the homescreen). I have a button that onclick calls FB.login(). When in standalone mode, the webapp redirects to the facebook login page (as expected), however afterwards, I get stuck on a white screen (I don't get asked to authenticate since I already have, but I imagine that the authentication screen would happen before the white screen) and don't get put back into the webapp. The same flow within the Safari app works as expected. Clicking login

Facebook and Cross domain messaging clarification?

可紊 提交于 2019-11-28 16:45:01
I wanted to investigate how the facebook login transfer data to the main page ( mypage) - despite the cross domain boundary limitation. And so I created a new page with the FB js sdk code : FB.login(function (response) { if (response.authResponse) {... It does open the popup : But when I investigated to see if I have any Iframes on my page ( My code doesn't contain any iframes) : I saw this : >>$("iframe") result : [ <iframe name=​"fb_xdm_frame_http" frameborder=​"0" allowtransparency=​"true" scrolling=​"no" id=​"fb_xdm_frame_http" aria-hidden=​"true" title=​"Facebook Cross Domain

Using “share_open_graph” Facebook UI to create dynamic share dialog for quiz results

白昼怎懂夜的黑 提交于 2019-11-28 15:39:20
Summary: My problem is getting FB.ui , via the share_open_graph method, to create a customised share dialog that contains different title, description, and picture, based on the user's actions on the page. The question was my first and I had no reputation, so numerous links were removed, but (thanks to everyone who gave me upvotes) I have been able to rescue the screenshots that were originally missing. EDIT: I ended up having to just use a regular popup window with a share dialog in it, it's not ideal but at least it works reliably. The more I looked around the web the more I found that many

Suggest Page to friends using PHP-SDK

柔情痞子 提交于 2019-11-28 14:51:26
How to implement "Suggest MY-PAGE to friends" using PHP-SDK or using Javascript SDK? First you need the Facebook SDK bundle that contains base_facebook.php, facebook.php and fb_ca_chain_bundle.crt . You will also need fbmain.php and config.php . Next you should have a file (e.g postToWall.php) that includes fbmain.php <?php include_once "fbmain.php"; ?> An example of postToWall.php file. <html> <body id="my_body"> <div id="fb-root"></div> <script> window.fbAsyncInit = function() { FB.init({ appId: '<?php echo $facebook->getAppID() ?>', cookie: true, xfbml: true, oauth: true }); FB.Canvas

Get Facebook fan page-id in page tab app using javascript

最后都变了- 提交于 2019-11-28 14:38:05
Can I get Facebook fan page-id in page tab app without authorizing user using javascript? And also if I authorized user and after that I get signed_request which only contains ["algorithm","code","issued_at","user_id"] not "page" object. How can I get "page" object? I want to add Page tab app similar to Pinterest Page App , which initially get UserId / UserName and after that if we open that app then it will directly open according to inserted UserId / UserName . No, you can not. The page info is send only in the signed_request that gets POSTed to your app so with JavaScript, you have no