facebook-javascript-sdk

Can non-game app use FB apprequests dialog in FB v2

二次信任 提交于 2019-12-05 18:15:23
In FB api v2.0+, can non-game app use apprequests https://developers.facebook.com/docs/games/requests/v2.2#implementation ? I tested that our app which is categorized as shopping app seems to be able to use apprequests without problem when switching to FB v2.1, however on the link of https://developers.facebook.com/docs/games/requests/v2.2#implementation , it says "Requests are available for games on Canvas, iOS or Android.". Why my test shows apprequests api works for FB v2 for my shopping app, but the documentation says it only work for Game app? Augusto There is in fact a current hole in

Using Facebook SDK in Angular 2

拥有回忆 提交于 2019-12-05 17:49:20
问题 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? 回答1: 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"

Facebook JavaScript API for google chrome extension

有些话、适合烂在心里 提交于 2019-12-05 17:24:04
I make a chrome extension to like specific page posts automatically. With a simple popup controller and background thread to handle fb api interactive I cannot load facebook js api into extension page with official example method. The script jssdk was loaded and executed checked by chrome developer tools. But window.FB is not defined by script loaded!!! I also add script tag manually. It appeared both background thread and popup window. If inject with iframe to load page, it will success loaded window.FB and popup a login/authenticate window. But it had a cross domain problem! The div#fb-root

Facebook feed dialog not working

你离开我真会死。 提交于 2019-12-05 15:16:19
I am trying to get the Facebook Feed dialog to work at a test site but I keep getting the same error message: "An error occurred with [app_name]. Please try again later.". When I look at the documentation I realize that the example in the documentation doesn't work either. Have tried a number of different solutions. Here is my test code: <html xmlns:fb="https://www.facebook.com/2008/fbml"> <body> <div id="fb-root"></div> <script> window.fbAsyncInit = function() { // init the FB JS SDK FB.init({ appId : '400714233333865', // App ID from the App Dashboard channelUrl : '//demo.xxxxxxx.se/nptest

creating event via facebook graph api

强颜欢笑 提交于 2019-12-05 11:56:44
Is there any way to create facebook event via code (as of today), referred to the documentation : for v2.0 for v1.0 Publishing was possible in v1.0 but not in v2.0. Is there legacy API support which I can use to create facebook events ? Any help appreciated. If your app is a Graph API v2.0 app (created after April 30th 2014), you don't have the possibility to create events anymore via the Graph API. If your app is v1.0, the possbility to create events will vanish on May 1st 2015. 来源: https://stackoverflow.com/questions/24778846/creating-event-via-facebook-graph-api

How to get the list of facebook groups using graph api

旧巷老猫 提交于 2019-12-05 11:17:56
In the Graph Api Explorer I did not find any permission like user_groups . I select all the "User Data Permissions" and "Extended Permissions" but it did not work. In graph api explorer I am using this command GET->/v2.4/me/groups . and i get empty JSON data Like this. { "data":[ ] } And if I use the old graph api version 2.2 Like GET->/v2.2/me/groups then I get the groups only in which I am admin not all the groups. If anyone have this experience and also have any solution please help me to solve my problem. Short answer: user_groups is deprecated with v2.4, see https://developers.facebook

JS SDK FB.login() works but pop-up dialog is staying open after logged in

守給你的承諾、 提交于 2019-12-05 10:00:25
问题 I am using the JS SDK for Facebook based on the NEW GraphAPI for Auth/Login. Has anyone had this issue when logging in after FB.login() was called via the JS SDK? The problem: after I initialize by calling FB.Init() asynchronously (because this all wrapped in a window.fbAsyncInit function) the login pops up; I log in but then that pop-up refreshes to show a white page and the pop-up stays open and does not close...why? I am waiting to check response.session in the FB.login() callback but it

Fancybox Positioning Inside Facebook Canvas iFrame

萝らか妹 提交于 2019-12-05 10:00:02
问题 OK so I have a iframe canvas app with its height set to "Settable" with the facebook javascrip sdk calls to FB.Canvas.setSize(); and FB.Canvas.setAutoGrow(); . These are working perfectly, as the iframe gets set to a certain pixel height based on its content. The problem is that when I make a call to Fancybox, it positions itself based on this height. I know that's exactly what its supposed to do as the fancybox jQuery returns the viewport by: (line 673 of latest version of jquery.fancybox-1

Force links to open outside facebook's inapp browser

て烟熏妆下的殇ゞ 提交于 2019-12-05 09:10:00
Facebook updated it's mobile app and created an in-app browser and as they say it's more faster. The problem is that any link of any page opens inside this browser. I tried a lot of combinations without luck... Some examples are bellow. Did anyone knows more about it and how to forece links to open on external browsers? <script> function externalLinks() { for(var c = document.getElementsByTagName("a"), a = 0;a < c.length;a++) { var b = c[a]; b.getAttribute("href") && b.hostname !== location.hostname && (b.target = "_blank") } } ; </script> <a href="http://www.google.com" onClick="externalLinks

set user (access token) within FB.init

筅森魡賤 提交于 2019-12-05 07:51:32
i want to publish story to user timeline even when they were not login with facebook. Actually I stored user access token in the database, if the user login in with email, i'll retrieve the access token for her. It works well in php (e.g get friends list after setAccessToken(token_from_database), but when i post the story, it always post to current fb login account's timeline. I think the problem is caused by fb.init: window.fbAsyncInit = function() { FB.init({ appId : 'XXX', // App ID status : true, // check login status cookie : true // enable cookies to allow the server to access the