I spent the last 5 hours trying to get large picture from Facebook page using this request:
https://graph.facebook.com/v2.1/Y.Anti.coup.D?fields=name,picture?type=large&access_token=CAAHH9uJXXOcBA
But I always get this error:
{ "error": {
"message": "Syntax error \"Expected end of string instead of \"?\".\" at character 12: name,picture?type=large",
"type": "OAuthException",
"code": 2500 } }
Sorry for my bad English, and I hope that you understand my problem.
You can do this a lot easier:
https://graph.facebook.com/page-id/picture?type=large
(no Access Token needed btw)
In your case, the problem is that you are using the question mark two times. This is how your code should work:
https://graph.facebook.com/v2.1/Y.Anti.coup.D?fields=name,picture&type=large&access_token=CAAHH9uJXXOcBA
Related
I'm using the wikimapia api for developing an Android application. I've used my first key for about two months but not, for any request I make I get:
{
"debug": {
"code": 1004,
"message": "Key limit has been reached"
}
}
I've created a new key, but now, for any request I make I get the same response: []
Does anybody know what the problem is?
It looks like something wrong on Wikimapi side. It returns me [] too.
There are few post about this issue on wikimapia forum
http://wikimapia.org/forum/viewtopic.php?f=4&t=14933&p=288045&hilit=empty#p288045
I want to get all the posts of a facebook page. I am following the link https://developers.facebook.com/docs/graph-api/reference/v2.8/post
For example URL : http://graph.facebook.com/v2.8/{page_id}/feed%20HTTP/1.1
I get the response as :
{"error":
{
"message": "Unknown path components: /feed HTTP/1.1",
"type": "OAuthException",
"code": 2500,
"fbtrace_id": "Em5dm7wPr9k"
}
}
I got the page_id from my facebook page.
Is my URL correct? Is this the correct way to get all the posts?
This is the correct way: https://developers.facebook.com/tools/explorer/?method=GET&path=bladauhu%2Ffeed&version=v2.8
You don´t need the Page ID, but you need to get rid of the " HTTP/1.1" in the API call. It´s just http://graph.facebook.com/v2.8/{page_id}/feed.
Trying to use IO Keen for Android, i'm using Android Sample available here (https://github.com/keenlabs/KeenClient-Android-Sample) the data is being sent, but they are always duplicate and the second always contains junk.
The HashMap event is clean before adding in the queue.
Am I the only one?
Watch these :
{
"keen": {
"timestamp": "2015-01-22T18:08:49.863Z",
"created_at": "2015-01-22T18:09:07.589Z",
"id": "54c13cc3672e6c486c7a28bb"
},
"click-number": 0
}
{
"keen": {
"timestamp": "2015-01-22T18:09:07.590Z",
"created_at": "2015-01-22T18:09:07.590Z",
"id": "54c13cc3672e6c486c7a28bc"
},
"-537732783": 3
}
"-537732783": 3 What is that?
Logcat :
FINER: Sent request '{"android-sample-button-clicks":[{"click-number":0,"keen":{"timestamp":"2015-01-22T13:14:19.075-0500"}}]}' to URL 'https://api.keen.io [...]
FINER: Received response: '{"android-sample-button-clicks": [{"success": true}]}' (200)
FINER: Sent request '{"android-sample-button-clicks":[{"-1236199318":1}]}' to URL 'https://api.keen.io [...]
FINER: Received response: '{"android-sample-button-clicks": [{"success": true}]}' (200)
This was caused by a bug in the 2.1.0 release of the SDK. It has been fixed in the 2.1.1 release.
(In more detail: the bug was in the retry limiting logic that was added as part of 2.1. See this PR for the fix: https://github.com/keenlabs/KeenClient-Java/pull/37)
Sorry for the mistake!
Even by using sample project provided in Corona SDk , I get a notification with error 400. I guess my json data is correct. Following is the code for Json message.
local jsonMessage =
[[
"registration_ids": ["]] .. tostring(googleRegistrationId) .. [["],
"data":
{
"alert": "Hello World!",
"sound": "default"
}
}
]]
This is the message on my device.
Based on the 400 error code, the problem must be your JSON :
400
Only applies for JSON requests. Indicates that the request could not
be parsed as JSON, or it contained invalid fields (for instance,
passing a string where a number was expected). The exact failure
reason is described in the response and the problem should be
addressed before the request can be retried.
With all the square brackets and html tag, it's really hard to understand from your question how your JSON actually looks like.
Anyway, here's how it should look like :
{
"registration_ids": ["some reg id"],
"data":
{
"alert": "Hello World!",
"sound": "default"
}
}
I solved this error by changing the format of my json and checking the format on this link http://jsonlint.com/# . This was a great help and also I replace alert icon by custom icon by using this:
http://developer.android.com/guide/practices/ui_guidelines/icon_design_status_bar.html
I've started facing some problems with Facebook FQL without any change to my code. And they're also getting solved without any change!
I'm receiving this annoying message that has no clear indication of the problem and possible solutions.
{
"error": {
"message": "An unknown error has occurred.",
"type": "OAuthException",
"code": 1
}
}
I've been using FB-SDK for Android and changed it to parse content from url (GET) and the problem still existing.
I'm trying to trigger this simple query (that works in the Graph API Explorer).
SELECT name,price_range,type,location,page_id FROM page WHERE page_id in (SELECT page_id,latitude,longitude FROM place WHERE distance(latitude, longitude, '-30.03852', '-51.17877') < 50000 LIMIT 20) AND (type='RESTAURANT/CAFE' OR type='LOCAL BUSINESS')
The url used is the following
https://graph.facebook.com/fql?q=SELECT name,price_range,type,location,page_id FROM page WHERE page_id in (SELECT page_id,latitude,longitude FROM place WHERE distance(latitude, longitude, '-30.03852', '-51.17877') < 50000 LIMIT 20) AND (type='RESTAURANT/CAFE' OR type='LOCAL BUSINESS')&access_token=ACCESS_TOKEN
Any help??
Your query works fine. I suggest to Log your active session token and make sure it is open when running query. You can check then state of session by using isOpened method
activeSession.getState().isOpened()
best of luck :)