facebook-javascript-sdk

Updating Facebook app settings via Graph API

▼魔方 西西 提交于 2020-01-06 12:46:09
问题 I have a problem with updating app settings via Graph API using Javascript SDK. I followed the documentation (https://developers.facebook.com/docs/graph-api/reference/app) and tried this code: FB.api( "/APP_ID/?access_token=APP_ID|APP_SECRET", "POST", { "object": { "canvas_url": "Test about text", "migrations": "{'secure_stream_urls': true}", "restrictions": "{'age': '21+', 'type': 'alcohol'}" } }, function (response) { if (response && !response.error) { console.log(response); } } ); The

Share animated GIF to Facebook using Javascript

一个人想着一个人 提交于 2020-01-06 03:18:06
问题 Now that Facebook supports the sharing of animated GIFs, I want to make a simple button that shares a selected GIF from a gallery, like this: var obj = { method: 'feed', source: 'http://img-9gag-fun.9cache.com/photo/aApVdqZ_460sa.gif', picture: 'http://img-9gag-fun.9cache.com/photo/aApVdqZ_460sa.gif', name: 'FB POST NAME GIF', caption: 'FB POST CAPTION GIF', description: 'FB POST MESSAGE GIF' }; FB.ui(obj); But it doesn't work. If I post that URL directly, the wall works perfectly but through

Facebook moderation link doesn't show when using hash in data-href URL

送分小仙女□ 提交于 2020-01-06 02:38:10
问题 I am using Facebook comments in my website. My problem is that I don't get to see the moderation tool. I see it when the code is embedded within the page when it loads. In my case, I load the comment section dynamically, inserting the comment div into another div and running FB.XFBML.parse(); . Note: I am using hash in the URL for the data-href. I do see the Facebook comments plugin and I can write comments, but the moderation tool is not visible. Any ideas how to make the moderation tool

send message to selected friends in facebook

瘦欲@ 提交于 2020-01-05 07:57:15
问题 I have the following code to send messages to selected friends by custom made $friends = $facebook->api(array( "method" => "fql.query", "query" => "SELECT uid,name FROM user WHERE uid IN (SELECT uid2 FROM friend WHERE uid1 = me())" )); where $facebook is the one having the details of the application & key values., & I get my friends list into the $friends I'll be having a textarea too to enter the message that has to be sent, now I'll be passing the selected list of friends & message to a

Further Facebook Login Javascript Errors

别等时光非礼了梦想. 提交于 2020-01-05 07:39:09
问题 This is kinda an extension of my previous question. With that somewhat resolved, I'm still encountering errors. I'm working off of the Javascript guide here. I'm now on the last code segment of the page, towards the bottom. At the top of my page, I have the following code ( APP ID and SECRET ID are defined in my code): <?php define('YOUR_APP_ID', '**APP ID**'); define('YOUR_APP_SECRET', '**SECRET ID**'); function get_facebook_cookie($app_id, $app_secret) { $args = array(); parse_str(trim($

How to use Facebook Graph API after authenticating with Passport.js facebook strategy?

那年仲夏 提交于 2020-01-05 04:22:08
问题 I've authenticated my user with the Facebook strategy and obtained their user info. My application now needs to hit other graph api endpoints on Facebook. I don't see a way to access a tool to send requests to the Facebook graph api. Upon inspecting the Strategy a little further, I see everything is built around the OAuth 2 strategy. 1) How do I use the facebook strategy to call other graph api endpoints? 2) Am I supposed to drill into the passport api somewhere to access a related oauth

AWS Cognito Federated Identity + Facebook: suggested logout flow

戏子无情 提交于 2020-01-04 15:57:13
问题 Looking at http://docs.aws.amazon.com/cognito/latest/developerguide/facebook.html there is an example of how to code up a login using AWS Cognito + Facebook. However, I’m unable to find examples of a logout flow. Because of the 3 parties interacting, including browser-side caching, and potentially asynchronous operations involved, it would be good to be aware of any gotchas or recommendations. So: what’s a good way of handling logout after logging in with AWS Cognito + Facebook? 来源: https:/

FB.UI Feed Dialog - cannot “share” a facebook's picture

十年热恋 提交于 2020-01-04 04:35:12
问题 Sharing facebook photo (really a facebook photo) using mobile web app & Feed Dialog. The problem: Cannot send facebook's photo to the Feed Dialog. All code works great. I get all properties as they sent to the function. FB.ui method: "feed" link: 'url' app_id: myAppID name: 'photo's name' description: '' caption: $('#albumName').text() picture: 'http://myUrl.com/logo.png' , (response) -> if response and response.post_id console.log 'Photo was shared' else console.log 'Photo was not shared.

In the FB marketing api, there is an option to export_format: 'csv', how do I download the csv file?

末鹿安然 提交于 2020-01-03 18:43:12
问题 I'm looking to download a CSV from my api call to FB ads, I've set it in the parameters as per the code below, the call works fine but I only get a paginated JSON as a response. I'm not quite sure how to access the CSV report, the response doenst give me any report ID or download link. How can I download this CSV? Using nodejs facebook-nodejs-ads-sdk image showing the parameter information 'export_format' Documentation: https://developers.facebook.com/docs/marketing-api/reference/adgroup

Can't load facebook js sdk from Chrome extension

生来就可爱ヽ(ⅴ<●) 提交于 2020-01-03 17:04:16
问题 I'm trying to use facebook sj sdk in a Chrome extension. Im doing this on my extension init: window.fbAsyncInit = function() { // init the FB JS SDK FB.init({ appId: 'APP_ID', // App ID from the App Dashboard //channelUrl : '//www.example.com/', // Channel File for x-domain communication status: true, // check the login status upon init? cookie: true, // set sessions cookies to allow your server to access the session? xfbml: true // parse XFBML tags on this page? }); // Additional