facebook-graph-api

How-To Upload Photos to facebook(graph api) with html file selector(input type=“file”)

有些话、适合烂在心里 提交于 2020-01-11 06:39:16
问题 I have a html file which select images from user's computer.code is given bellow <html> <body> <form enctype="multipart/form-data" action="http://localhost/uploader/upload.php" method="POST"> Please choose a photo: <input name="source" type="file"><br/><br/> Say something about this photo: <input name="message" type="text" value=""><br/><br/> <input type="submit" value="Upload"/><br/> </form> </body> </html> When I press upload button,I need to pass the real path of the selected image into

How to detect default avatar on facebook?

假装没事ソ 提交于 2020-01-11 06:33:23
问题 How to detect default avatar on the link like this: https://graph.facebook.com/'.$id.'/picture?type=large ? Is it the only way to get avatars (male/female) from special prepared profiles and then compare by e.g. md5() ? It's hard to believe this is the only way. 回答1: You can use the redirect=false parameter: https://graph.facebook.com/naitik/picture?redirect=false Then facebook's responce is json and contains this data: { "data": { "url": "https://fbcdn-profile-a.akamaihd.net/hprofile-ak-prn1

OAuth Exception #2500

北城以北 提交于 2020-01-11 04:12:07
问题 I am trying to access my Facebook account with an App access code (because I want indefinate access - I do not want an access code which can expire) I have tried the following code using AppId and AppSecret (which are valid) : string accesstoken = m_AppId & "|" & m_AppSecret; Facebook.FacebookClient fb = new Facebook.FacebookClient(accesstoken); Facebook.JsonObject fbMe = (Facebook.JsonObject)fb.Get("me"); and the last line throws an exception stating OAuth Exception #2500 An active access

How to delete a Facebook comment post using the Facebook GRAPH API?

坚强是说给别人听的谎言 提交于 2020-01-11 04:05:08
问题 I started researching this because I wanted to be able to delete a comment on the wall of a Facebook Event, because the "Remove post" doesn't seem to be applicable to comments on an Event wall. However, since I don't know if it is even possible I decided to see if I could mannually delete a post I made to my own wall first since that is possible. Note I am NOT using any SDK; I am just building the URL and entering it in the address bar in Firefox v3.6.17. These posts have helped me alot since

Facebook test accounts using selenium - failing to log in my fake users

夙愿已清 提交于 2020-01-11 03:42:06
问题 I am programmatically creating test accounts, and then immediately trying to log in w/ them using a selenium driven browser. Unfortunately, the browser is just redirected to the facebook homepage. I can briefly see what appears to be the correct url prior to the redirect flash by, so I have no reason to believe the browser isn't going where I intend it to. That said, if create a fake account, and then just paste the login_url into a browser, things work fine. Anyone have any idea why that

How can I get the list of top 10 artciles shared on Facebook using Graph API or FQL?

天涯浪子 提交于 2020-01-11 03:28:04
问题 On my site, I have Facebook share plugin so that users can share articles on Facebook. Now I want a report of top 10 articles shared on Facebook from my site in last one week or month. I tried using FQL, https://graph.facebook.com/fql?q=SELECT url, normalized_url, share_count, like_count, comment_count, total_count FROM link_stat WHERE url like '%www.indiatimes.com%' order by total_count desc limit 10 But 'like' keyword doesn't work in fql. Please advice. 回答1: I suggest you to do this way:

How to get friend list from Facebook using Android Facebook sdk? [closed]

99封情书 提交于 2020-01-10 08:03:39
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . I have created an app on facebook and achieve some first steps for implementing Facebook SDK. This is what I'm trying to do: get list of friends from Facebook and to be able to pick some friends from that list and import them to my app. How an I do that? 回答1: Are you trying to get the Facebook friendlist of the

Facebook AccessToken.getAccessToken is null on opening of app even after first login

断了今生、忘了曾经 提交于 2020-01-10 02:44:07
问题 I have integrated latest Facebook android sdk (Sdk 4.0). This is the code I have added in my onCreate method. FacebookSdk.sdkInitialize(this.getApplicationContext()); callbackManager = CallbackManager.Factory.create(); if(AccessToken.getCurrentAccessToken()!=null){ Log.d(FBTAG,"facebook already logged in"); isFBLogin = true; } LoginManager.getInstance().registerCallback(callbackManager, new FacebookCallback<LoginResult>() { @Override public void onSuccess(LoginResult loginResult) { // App

Post Image to the Facebook using Graph API by Giving the source of the file

╄→гoц情女王★ 提交于 2020-01-07 09:25:53
问题 I can upload the image to the facebook acoount using below code: <?php include_once "facebook.php"; ini_set("display_errors",0); //configuring application to post. $app_id = "YOUR_APP_ID"; $app_secret = "YOUR_APP_SECRET"; $post_login_url = "YOUR_REDIRECT_URL"; $code = $_REQUEST["code"]; //Obtain the access_token with publish_stream permission if(empty($code)){ $dialog_url= "http://www.facebook.com/dialog/oauth?" . "client_id=" . $app_id . "&redirect_uri=" . urlencode( $post_login_url) . "

Hiding application source when posting to Facebook fan page via graph API

久未见 提交于 2020-01-07 07:10:34
问题 I've successfully posted to a fan page as the actual page via the Graph API. The problem is that the post says it was posted at " time via application name ". Is there any way to hide this, so my post looks exactly as if I typed it directly into Facebook? I'm building a messaging center that can easily deliver messages on many different channels, Facebook being one of them. Clients probably won't appreciate their Facebook posts linking to my application, nor do I want to set up a new Facebook