facebook-graph-api

Facebook Does Not Grab Proper og:Image On Initial Share

不羁的心 提交于 2020-01-07 02:15:36
问题 I have Wordpress site with a small bit of php code which creates the OpenGraph tags for each post. Unfortunately the Featured image (og:image) is not grabbed by Facebook when I copy the URL into a new FB post. Just to clarify the flow of events: My users create a Wordpress post. Then someone shares it on Facebook by copying the link into a FB post. Facebook displays the proper text, but grabs the wrong og:image. I go to the object debugger and test the Wordpress post. It shows no errors and

How to get timezone from facebook with omniauth?

给你一囗甜甜゛ 提交于 2020-01-07 00:40:11
问题 Everything in user.rb is passing correctly upon sign up except timezone. I can't figure out why I'm getting this error upon a user attempting to sign in: 2016-03-30T20:13:38.083469+00:00 app[web.1]: NoMethodError (undefined method `timezone=' for #<User:0x007fdd2976e338>): 2016-03-30T20:13:38.083470+00:00 app[web.1]: app/models/user.rb:72:in `block in from_omniauth' 2016-03-30T20:13:38.083471+00:00 app[web.1]: app/models/user.rb:66:in `tap' 2016-03-30T20:13:38.083471+00:00 app[web.1]: app

empty friends array in facebook open graph api v2

不羁的心 提交于 2020-01-06 20:35:40
问题 I'm trying to pull a list of my friends in Facebook's OG api v2. If I use the explorer here: https://developers.facebook.com/tools/explorer?method=GET&path=me%2Ffriends&version=v2.0 I can get my friends, but if I program the app and make a json call: function getUserFriends(){ FB.api('/me/friends', function(response) { console.log(response); }); } The friends array response is an empty object. I'm using the facebook login button: <fb:login-button scope="public_profile,email,user_about_me,user

How do you create test users for a Facebook app with type Native/Desktop?

a 夏天 提交于 2020-01-06 20:23:38
问题 In order to create test friends for my Facebook app I need an application access token, which I attempted to get using this request however it returns the error, "The request is invalid because the app is configured as a desktop app" which is supposedly caused by having your Facebook app type set to Native/Desktop, which mine is... so how else would I get the app access token? 回答1: In a lot of cases you can probably switch your Facebook Application to being a Web app rather than Native

Get facebook friend list in yii2 framework

坚强是说给别人听的谎言 提交于 2020-01-06 19:23:13
问题 I am using Yii2 Framework and I have to get Facebook friend list in web-service, for this i am following this steps: FB FriendList Tried this: <?php use yii\Facebook\Facebook; // facebook class public function getFbUserListFB() { $fb = new Facebook([ 'app_id' => 'appID', 'app_secret' => 'appSECRET', 'default_graph_version' => 'v2.3' ]); $response = $fb->get('/me'); print_r($response); } ?> but getting this error: { "name": "PHP Fatal Error", "message": "Class 'yii\Facebook\Facebook' not found

How to query Facebook comments plugin comments information using C#?

放肆的年华 提交于 2020-01-06 16:00:16
问题 I am trying to fetch comment information from this page (scroll down to **Comments Plugin Code Generator* section) I am using FacebookClient class from Facebook Nuget package to fetch the data. My code is the following: string oauthUrl = $"https://graph.facebook.com/oauth/access_token?type=client_cred&client_id={appId}&client_secret={appSecret}"; string accessToken = client.DownloadString(oauthUrl).Split('=')[1]; // this is included as a sanity check that the client can fetch data (correct

Facebook wall post error from Android app?

假装没事ソ 提交于 2020-01-06 15:49:32
问题 I have successfully integrated FB with my app.I want to auto post some text,links,images to my facebook wall after giving app permission from facebook account.I have tried using below provided logic but am getting {Response: responseCode: 403,graphObject: null,error: {errorCode: 200,errorType: OAuthException,errorMessege: (#200) The user hasn't authorized the application to perform this action}, isFromCache:false FacebookActivity.java public class FacebookActivity extends FragmentActivity {

Adding a tab to a fan page does not work… error: (#210) Subject must be a page

喜欢而已 提交于 2020-01-06 14:18:15
问题 I'm trying to add a tab to a fanpage using the graph api/PHP SDK and I'm receiving an error : (#210) Subject must be a page I've tried using both the user access_token AND the page access_token but neither work. I've tried using the page id of numerous accounts and still no go. Here is my code: <?php $path="/PAGE_ID/tabs/"; $access_token="ACCESS_TOKEN"; $params = array( 'app_id' => "APP_ID", 'access_token' => $access_token ); try{ $install = $facebook->api($path, "POST", $params); }catch

Creating and inviting a group to an event via graph api

流过昼夜 提交于 2020-01-06 14:15:51
问题 Is there still no way to invite all the group members to an group event? I am able to create the group event via the api, but members are not invited to the new event. If i create the event via the facebook website i have the option to select "invite all group members". I can't seem to find any way to reproduce that functionality via the api. 回答1: Since there was no way to do this directly via the graph api i ended up making my own php w/mysql solution. Basically i make a table of all my

Facebook API - See Posts which have tagged my Facebook page

非 Y 不嫁゛ 提交于 2020-01-06 12:54:09
问题 I want to use the Facebook API to retrieve all posts/status updates on all users which have tagged my Facebook page. I have searched a lot and did not find any solution. Any solution that you know of guys? 回答1: Facebook does not expose an API that supports this scenario. 回答2: You can use this API. When you use /{page-id}/tagged to show the posts that tag this page, the results include posts from other pages only if those pages are verified. Link : https://developers.facebook.com/docs/graph