I am trying to search users through new iOS Twitter framework by using following url ..
https://api.twitter.com/1/users/search.json?q=%#&page=2&per_page=20
The api says that maximum 20 persons will be searched per_page..
https://dev.twitter.com/docs/api/1/get/users/search
So i set the page=2 to fetch 40 persons but it is still fetching 20 persons.
Is this the bug in twitter framework or there is something else that i have to do..
Help would be appreciated.
No matter what query you run, you'll get 20 people back. The reason to set page is so that you can page through the results.
page=1&per_page=20 returns the first 20 people.page=2&per_page=20 returns the next 20 people. And so on.
Related
When trying to fetch Facebook insights API for the following action offsite_conversion.fb_pixel_purchase I always get less number than Facebook show on their ad manager, I tried to inspect their network calls and URL structure and I see they're using the same field offsite_conversion.fb_pixel_purchase to show Results I am not sure why the numbers are mis-matching. I tried to query from the Graph API and from my shell with the same results.
You may check use_account_attribution_setting and use_unified_attribution_setting in here: https://developers.facebook.com/docs/marketing-api/reference/ad-campaign-group/insights
Setting use_unified_attribution_setting to true worked for me.
I did some testing and found out that if you use an additional breakdown, FB will return less conversions. There might be a bug in their API when you use breakdowns.
I tried getting offsite_conversion.fb_pixel_purchase with
'breakdowns' => 'hourly_stats_aggregated_by_advertiser_time_zone',
and facebook retuned 5 conversions.
if I remove the breakdown and get the data grouped daily I get 11 conversions which is what Facebook Ads Manager shows
I am using the Facebook Graph Api for get posts from my public group. It worked, but suddenly next link doesn't work now. I didn't change anything.
https://graph.facebook.com/v2.8/{groupID}/feed?access_token=myUserToken show me first ten posts in my group, but the link in paging -> next show empty data. There's another ~ 30 posts
{
"data": [
]
}
Parameter Limit work only in interval 1 - 10 for me.
Any idea please? Thanks :-)
It's a bug on facebook side, they are currently resolving it:
https://developers.facebook.com/bugs/1796973007211974/
"Thank you for reporting this issue.
We have managed to reproduce this issue and it appears to be a valid bug. We are assigning this to the appropriate team.
Sergey
-November 2 at 6:53am"
I'm using Facebook Graph API v2.2 (had this problem on v2.1 as well) and I'm requesting page_impressions through the insights endpoint for a set date range:
01-02-2014 - 28-02-2014.
After requesting I print out the impressions from the results, and most of the time Facebook returns a total of 6763 impressions. Sometimes though, a slightly different amount is returned but there doesn't seem to be a pattern.
I've requested the impressions 40 times. The first 11 times: 6763, then once: 6709, 5 times: 6763, 1 time: 6720 and 12 times: 6763.
Is anyone familiar with this or having the same problem?
Thanks!
EDIT: I just had a result of 248 impressions... nowhere near 6763...
Seems this is a Facebook Bug. Found a bugreport about it on the Facebook Developers forum. Different endpoint, same problem:
https://developers.facebook.com/bugs/877357682326329/
Currently i am using following FQL query :-
https://api.facebook.com/method/fql.query?query=select post_id,likes FROM stream WHERE source_id=XXXXXXXX LIMIT 0,10000&access_token=XXXXXXXXXXXXX&format=json
I have two Facebook Accounts / pages & able to download data using above API. Able to retrieve posts & post likes count.
But, from last three days, for one Facebook account above FQL query is not working. it is returning message :- "error": "Request failed" . For other account it is working fine.
For each facebook Account / pages i have generated separate Access Tokens.
But, if i update limit from : -
Limit 0,50
Limit 50,100
then it is working & returning posts from page but not returning all post which i have previously getting from Limit 0,10000
Please help me, if any one have idea about this issue ?
Thanks
Facebook will cancel queries which take too long or too many resources to execute. In general, I would never use LIMITs which are that high. There's a high probability that they will fail, and you can't really incfuence the query execution "load" other than setting the LIMIT to a reasonable number (which means implementing a paging mechanism).
I created test account on SoundCloud and tried to use me/activities API for getting recent activities. Test account have exactly 30 activities (reposted playlists - 6; created playlists - 1; reposted tracks - 23). With limit=1 parameter I’m receiving exactly 23 activities, and 16 of them are empty like this:
{
"collection":[],
"next_href":"https://api.soundcloud.com/me/activities?cursor=9b768680-9ecc-11e3-805c-3a36c8290708\u0026limit=1”,
"future_href":"https://api.soundcloud.com/me/activities?limit=1\u0026uuid%5Bto%5D=6fdfc300-9fd6-11e3-80b5-0fd1bb49c7d8”
}
Other 7 containing info that contains reposts from users I follow, and created playlist.
So my question is, what I’m doing wrong? Is it supposed to happen? And, if so, is there any way to know all the activity?
I’m doing an iOS app, and it seems like native SoundCloud app doing that just fine. Is it using special API, that is’t available for public?
Thanks in advance.