w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML Categories
Facebook Graph API - access_token=app_id|app_secret - search Graph API without user login
According to Facebook The following changes will go into effect on July 10, 2013: ..... Graph API search changes App access tokens will be required for all search Graph API calls except Places and Pages. Search for application will no longer be supported.

Categories : C#

2 near identical URL's integrated with Open Graph tags have separate behaviors when doing a Facebook graph call
Well, I think we cannot help you without the real url of the object, so as to see what it is! Have you try both url (the real ones) in facebook debugger: https://developers.facebook.com/tools/debug to see the difference?

Categories : Facebook

Prevent Facebook from grouping Open Graph actions in Graph API?
You need to use a different endpoint: /me/<app_namespace>:<action_name> This will return all actions published by your app for a given action and a given user. For example, using a user access token: https://graph.facebook.com/me/my_cooking_app:bake?access_token=...

Categories : Facebook

How to fetch data from given graph URL in facebook graph API
This is just a 2 steps thing Parse the next/previous URL from the response. You can do it yourself or one of the many libraries With the timestamp parsed, just call your function recursively and "since" in the Graph URL. function getFBData(date) { FB.api('/me/photos?fields=created_time&since=' + date, function(response){ var pager = "parse the paging data from facebook" getFBData(pager); }); }

Categories : Javascript

Facebook Graph API & django-facebook - posting links and photos to page feeds
Facebook Graph API PHP SDK posting on page as page Found it. There is a different access token for impersonating the page to post as the page. You get that from /me/accounts and use that token to post as the page. Updated working code: @facebook_required_lazy(scope=['manage_pages', 'publish_stream', 'photo_upload']) def index(request): if request.method == 'POST': form = CPYPosterForm(request.POST) if form.is_valid(): fb = require_persistent_graph(request) msg = form.cleaned_data['msg'] pages = form.cleaned_data['pages'] me_accounts = fb.get('/me/accounts') access_token = None resp = dict() for p in pages: for d in me_accounts['data']: if d['id']

Categories : Django

Fetch facebook user public data, which available without loggining througth Facebook Graph API if any exists
This isn't possible unless you have an access token. The public graph doesn't reflect the browser information it reflects what is given in the documentation https://developers.facebook.com/docs/reference/api/user/

Categories : Java

Facebook Graph API, Development of Facebook page post targeting( make visible only specified country/city )
Try feed_targeting instead of targeting! All parameters which you can target like languages,cities,counties are facebook specific. You can resolve them via autocomplete data : "{'locales':[1001],'countries':[GE],'cities':[825886]}" Nice feature for automatic posting with targeting but so bad documented in the Facebook documentation...

Categories : PHP

Generating list of facebook friends using Facebook's Graph API
First of all you need to add proper permission to access education history of user & user's friends, which you can achieved by doing this but remember user_education_history is to access User education while friends_education_history is for User's friends education history: $params = array( 'scope' => 'user_education_history, friends_education_history, user_location, email'); $loginUrl = $facebook->getLoginUrl($params); And to access education field you have to modify one line from your code like this: $user_profile = $facebook->api('/me?fields=name,education,email','GET'); You can use below code to just print your $user_profile and then parse it according to your requirements: <pre><?php print_r($user_profile); ?></pre> Probably its too late answer f

Categories : PHP

Retrieve zip code of a facebook user by facebook graph API
If you check the documentation for the /me call at https://developers.facebook.com/docs/reference/api/user/ you'll note that there is no reference to the user's zip or postal code. I'd recommend you use ask for the user_location permission and then call /me?fields=location and try to derive the zip code from the information contained therein - this answer http://stackoverflow.com/a/7129344/2091159 - has some information about doing so.

Categories : PHP

How to get facebook users' public statuses using facebook graph API?
https://graph.facebook.com/PAGE_OR_USER_ID/statuses?access_token=ACCESS_TOKEN works fine if you have a valid access token.

Categories : Facebook

How to disable right click on certain html page with some exceptions
You can try something like: $('body *:not(.context)').on('contextmenu', function (evt) { evt.preventDefault(); }); EDIT: This seems to work better: $(document).on('contextmenu', function (evt) { if (!$(evt.target).is('.context')) { evt.preventDefault(); } });

Categories : Javascript

How to disable the Facebook App Name from appearing when sharing on Facebook
If you use the built-in sharing functionality of iOS, SLComposeViewController, this should show that the post was made with Facebook for iOS and avoid your problem.

Categories : IOS

Why facebook access token from Spring Social returns empty array, while Facebook Graph Api token works fine
You need to submit a post request to spring social ConnectController for the specific provider e.g. http://wwww.yourdomain:8089/connect/facebook. Spring social then will redirect the user to facebook authorization page where the user will grant your app with the asked permissions and send back a code to your server. Spring social then will exchange that code for an access token. You need to establish a connection for that user to be able to perform requests against FB on his/her behalf. Here is a doc page that might help http://static.springsource.org/spring-social/docs/1.0.0.M2/reference/html/connecting.html

Categories : Java

How can I get facebook cover url from Facebook graph API
To parse the JSON in PHP you are required to use json_decode(returned_facebook_json) and then access the data as you access a Object, for example $JSONString=file_get_contents('http://graph.facebook.com/{user_id or page_id}?fields=cover'); $parsedJSON = json_decode($JSONString); echo $source = $parsedJSON->cover->source; echo $offset_y = $parsedJSON->cover->offset_y;

Categories : PHP

Highcharts : Disable top spacing from column graph
You'll want to set stacking to percent, rather than normal. plotOptions: { column: { stacking: 'percent', dataLabels: { enabled: false } } }, Documentation: High Charts Documentation Normal stacking assumes there will be various values for each column, which would mean you would have different sizes of columns--that's why it leaves the space at the top. Setting it to percent would mean every column would be the same height regardless of the values it contains. On a side note, the export button is going to be in the way of the graph if you intend on keeping them this small. You can remove it by adding this to your list of options. exporting: { enabled: false } Fiddle Link

Categories : Javascript

Facebook graph api m.mid vs m.id
Did you find a definite answer for this? From my observation, the first message in a conversation has id with the format m_id.<numeric id>. All subsequent messages have id with the format m_mid.<numeric id>:<hex hash>

Categories : Facebook

facebook graph api fql
This isn't possible in one query, this should be apparent from the number of field expansions you are attempting in Graph API. This might be possible with some multi-queries and batch calls.

Categories : Facebook

old facebook pages and graph api
Graph API (Graph API Explorer) AFAIK, you can get all pages that you administrate so probably there are that wierd things. Get access token with permission manage_pages and query /me/accounts

Categories : Facebook

rejected by Facebook's Graph API
that error occurs usually when you're generating an access token while logged in with one account, and then trying to use the same access token with another account, so make sure you're using the same account (trivial, but sometimes these mistakes can happen). if that checks out, verify that you're checking the ads_management checkbox in the extended permissions tab while generating the access token in the graph api.

Categories : Facebook

How to get data from facebook Ads on the Graph API?
You need to add it at the end of the url as a url parameter: "https://graph.facebook.com/act_[my_account_number]/adgroups" . "?access_token=" . $access_token However, from the code I think you are getting an App Access Token, and you need a Page Access Token or a User Access Token to get the ads related to your Facebook Page. Please refer to https://developers.facebook.com/docs/facebook-login/access-tokens/ for more information.

Categories : PHP

how to get post id GRAPH API facebook
Actually the length of post_id is quite big since it includes both userId and objectID. So, while making the query you should provide the post_id in the quotes. The code seems to be fine, but in the example link you shared, the id is not in quotes Working Example

Categories : PHP

Fetching data from facebook using graph api
You can do something of the following form: foreach (Array['data'] as $var) { $ID=$var['id']; $Name=$var['name']; } Note: In Array['data'], Array will be the name of the variable that you are saving this data in.

Categories : Facebook

Using username in facebook graph api post
I dont want to generate yet another request to facebook for getting the username, as I am already generating 2 requests for getting user id(from redirect url). No you can't. You have to make the request to fetch the name. /me?fields=name But why does it matter, it'll take very less time to query this.

Categories : Android

Facebook Graph API. How to get likes for comment?
Get the comment ID and make this Graph API request: https://graph.facebook.com/COMMENT_ID?fields=likes The comment ID is in fact the concatenation of: the POST_ID (246595548763188_464132103676197), the COMMENT_ID (464146663674741), which would give in your case: 246595548763188_464132103676197_464146663674741. So, this should work: graph.facebook.com/246595548763188_464132103676197_464146663674741?fields=likes

Categories : Facebook

Commenting on a POST using Facebook Graph api
Like the error message says, you need to use OAuth tokens to publish comments on Facebook. Obtaining tokens: For obtaining those tokens you need to redirect your user to Facebook end get response tokens.Once authenticated in Facebook your user will be redirected to your application and then you can store those tokens provided by Facebook in your database if you want. Authorization: I cannot find the documentation of your SDK, but according to the JavaScript SDK documentation (section "Creating comments and replies"): Permissions This call must be made with publishing permission and a valid access_token. The token should be from a person or page that is allowed to comment on the parent object on Facebook. In order to create a comment as a Page, a page access token is requ

Categories : C#

arguments when using the PHP Facebook API Graph library?
Yes you require an access_token to query on behalf of user on Facebook, it can either be an App access token or User access token. If the user authorizes your app, with required permission which in your case would be read_stream permission, then you can obtain his access token and query for status updates. The default access token is your App access token which can access only public data. Also I would suggest you to to over the PHP SDK documentation for getting started with it.

Categories : Facebook

Issue related to Facebook Graph API
You need a user to connect in order to give him the permissions. The Facebook() constructor only takes an app ID and a key: $facebook = new Facebook(array( 'appId' => 'xxxxxxxxxxx', 'secret' => 'xxxxxxxxxxx....xxxxxxx')); The permissions should be added to the LoginUrl: $loginurl = $facebook->getLoginUrl(array( 'scope' => 'manage_pages,offline_access,publish_stream,user_photos')); Once the user clicked on the login URL, you can then use the $facebook instance to get the user session: $user = $facebook->getUser(); If the user indeed exists, you can finally make the API request you want: $result = $facebook->api('/'.$rssfeed_id, 'get'); Follow this complete example: https://github.com/facebook/facebook-php-s

Categories : PHP

Facebook Graph API Search Issue
You will need an access token; this means an [registered Facebook App][1] Facebook API changes Jul 10 '13: Graph API search changes App access tokens will be required for all search Graph API calls except Places and Pages. Search for application will no longer be supported. Create an Facebook developer account Create a new Facebook App GET https://graph.facebook.com/oauth/access_token?client_id=APP_ID&client_secret=APP_SECRET&grant_type=client_credentials Append the returned access_token=... to your search requests

Categories : Facebook

Facebook Retrive Data using Graph API using c#
http://www.codeproject.com/Articles/380635/Csharp-Application-Integration-with-Facebook-Twitt I hope this will help you.!!!

Categories : C#

How to send a Facebook App Notification via the Graph API?
App notifications can only be send from Canvas apps. My app was set to Website with Facebook Login in the Facebook settings, which doesn't allow notifications. To solve the problem, I just checked App on Facebook in addition to Website with Facebook Login (though I believe it works with only App on Facebook as well) and specified a canvas URL.

Categories : Python

Facebook Open Graph - How to add new property?
The bug on facebook (Open Graph) has been fixed, so now I can add properties to an action again ;) To my second question: If you add property my_property to your action you only have to insert {my_property} into your status message via Open Graph...

Categories : Facebook

Upload video to facebook using graph api
is it correct to use this: $img = $_FILES['source']['name']; No, as http://www.php.net/manual/en/features.file-upload.post-method.php tells you, this is “The original name of the file on the client machine.” – which is of course not what you want. You want to use the name of the file that gets stored temporarily on your server after it has been uploaded to your server by the client: $_FILES['userfile']['tmp_name'] The temporary filename of the file in which the uploaded file was stored on the server. If this does not work (f.e. the temporary directory for file uploads might not be accessible to cURL [which the PHP SDK uses internally] directly), the you will have to use move_uploaded_file first to store the file in another location on your server.

Categories : Facebook

Post to facebook using Graph API and ruby
Instead of posting directly using https requests to the Facebook API, why not use a library? Koala is a good option. With that, something like this would post on your wall: require 'koala' @api = Koala::Facebook::API.new(oauth_access_token) @api.put_wall_post(process_result(fql)) You need to gem install koala and to setup your oauth_access_token before using Koala. Check Koala's readme for that.

Categories : Ruby On Rails

Facebook Open Graph with Two Objects
You can configure the structure of the sentences when you define your stories in the Open Graph section of the developer tool. This allows you to reference any attribute of you object to construct the sentence like in the example below: The way the story is rendered depends on many factors, and in some cases it will render as "viewed a picture" instead of the full title.

Categories : Facebook

get facebook graph user from Respone
According to the documentation, you can use http request on https://graph.facebook.com/me?fields=id&access_token=replace-this-by-your-access-token to get the id of the logged in user

Categories : Android

how to get public events in graph facebook
Use the /search endpoint search?q=New York&type=event https://developers.facebook.com/docs/reference/api/search/

Categories : Facebook

Parsing graph.facebook album
After many hours of scratching head, came to this solution. Not much efficient one, but it will do the things you need. JSONObject albumObj = json.getJSONObject("albums"); // Log.d("Json values", albumObj.toString()); JSONArray dataArray1 = albumObj.getJSONArray("data"); for(int i=0; i<dataArray1.length(); i++){ // Log.d("data id", dataArray1.getJSONObject(i).getString("id")); JSONObject photoObj= dataArray1.getJSONObject(i).getJSONObject("photos"); // Log.d("photo object", photoObj.toString()); JSONArray dataArray2 = photoObj.getJSONArray("data"); for(i

Categories : Android

Trouble with permession Facebook Graph Api in .net
The ability to post on friend's wall has been depreciated by the Facebook. Quoting from the Developer Roadmap We will remove the ability to post to a user's friends' walls via the Graph API. Specifically, posts against [user_id]/feed where [user_id] is different from the session user, or stream.publish calls where the target_id user is different from the session user, will fail. If you want to allow people to post to their friends' timelines, invoke the feed dialog. Stories that include friends via user mentions tagging or action tagging will show up on the friend’s timeline (assuming the friend approves the tag). For more info, see this blog post. Also the ability to disable the breaking change will not be available as this has already gone into effect permanently for everyone.

Categories : Facebook

Facebook Graph not returning email
According to the Facebook Documentation: By default, not all the fields in a node or edge are returned when you make a query. You can choose the fields (or edges) you want returned with the "fields" query parameter. This is really useful for making your API calls more efficient and fast. This is valid from v2.4, (previous versions retrieved some default fields). When you register a new app you are entitled automatically (without manual review) to three permissions: email, public_profile and user_friends. In your code "email" is in scope (which is good) so just change your query to: https://graph.facebook.com/me?access_token=xxx&fields=email You probably wanted the public_profile fields that you automatically got in previous versions of the API. Do so so, add "public_pr

Categories : Javascript

Facebook Graph Feed documentation
What you are looking for is Time-based Pagination to navigate through results data using Unix timestamps which point to specific times in a list of data. You can use the until field which as per documentation is A Unix timestamp or strtotime data value that points to the end of the range of time-based data. For example, following will give you the posts of User until 10th June 2013 me/feed?until=1370840400

Categories : Facebook



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.