I'm looking to possibly build an iOS app where I would need to get a list of friends of the logged in user who are also using the app and then loop over that list to get an even bigger list of their friends who are also using the app. Hopefully the little scenario below will better illustrate what I mean if it's not clear
Lets say "Sam" uses my app and he has 400 friends of which 30 are using my app. I would like to loop the 30 friends who are using the app to get their friends list so lets say the first person of the 30 is "Jake" and he has 10 friends who are also using the app they should be added to an array and then the next person in the 30 people loop is "Jen" and she has 15 people using the app they would be added to Jake's 10 friends and so on.
I know it's possible according to this link Get a list of friends of a friend on Facebook to get the friends list of a friend but my main concern is speed. Do you think getting a list of friends of friends would take too long for a user of the iOS app?
The list grows linearly, so I don't think there would be much of a speed issue. You can always set a limit to the total number of calls. For example, if I have 200 friends using your app and you limit the number of calls to 100, only the first 100 friends' friends will be shown. That can be quite an extensive list.
You could also inform your user that the operation he/she is trying to perform might take a while and give them the right to cancel at any time. When they cancel you could display the data you already received.
As a last note instead of using an array to store the friends of friends list, It would be better to use a set because chances are many of those people are already friends with each other. So if "Jake" and "Jen" are friends, they would not appear twice on the list.
Related
I have a small script to like certain tweets, but I noticed that unlike manual likes these dont show up in a users notifications. I tested this by using the tweet id of a tweet on another account. (Yes the tweet is being liked successfully and it is also shown on the tweet, just not in the notifications of the user)
Is it possible to have it appear in notifications like a "normal" like would?
I tried to see if it had to do with the "high" amount of likes (one per minute) or the type of tweets, no change. Google also didnt show up anything (obviously, thats why Im here).
I am currently writing an iOS real time game app auto-matchmaking function. I really need help to find out how can the two players can interact. Specifically, when plaeryA pressed the find match button indicating playerA is looking for a match. It sends a query to Parse database and sees that playerB is is also looking for a match. Now, I want them to be matched. I know it is a very bad idea to use queries to frequently polling the data from the database to check if the player is matched or not. Is there anyway I can achieve it such that 'if A and B is matched, a notification/alert is sent to both players to wait for their acceptance, if A & B both accepted the match, then the two players would perform the segue to the game view controller simultaneously.
I googled online, all I got is that I have to either use Apple's Game Center or Google Play service. But both of them requires users login. I do not really want that because it would be tedious user experience. The user had to register and sign in the account of my app, and now they have to sign in either game center or google again.
Any advice/help is greatly appreciated!!
So I have created an small java program with Twitter4J. The main purpose is to destroy all of my favorites. However, Twitter seems to be misrepresenting the favs count. This is what I see on my profile:
I know it's in Spanish but it translates as "You have not marked any Tweet as favorite yet". However, on the stats we can see that I have 6,021 favs.
Does anyone know why is this or if someone has noticed before? Calls to the twitter API also return with zero favs.
Thanks!
I had noticed that, but on Tweets.
Sometimes Twitter counts wrong the numbers of Tweets (or in your case favorites) and that happens because those tweets are too old. Maybe you have an old account (2010-2011) and you had marked those tweets as favorites before.
This is because you can't see the tweets, but you've still got them favorited. There are several ways this can happen. For example:
You have been blocked by the profile you favorited
Their profile is now locked so you can no longer see their tweets you favorited
In both cases, you can't see the tweets themselves, but the tweets aren't deleted, so they still count towards your total.
I'm building an iOS app related to Twitter and I need to know how do user search engine works. More specifically, I want to make my app show the usernames starting with a certain string. Just as when you're tweeting something and you start typing #Jo and below it appears #JohnSmith, #JoshBennett, etc. ordered by relevance.
In order to figure out how does this feature work, I thought that Twitter may have downloaded all my followers and following list, so that they can access it locally. But I found out that in my search results there appeared people that I don't actually follow but some of my followers follow them. So, does Twitter have downloaded all my followers and all my followers' followers?
In any case, what I want for my app is to only look for the users I follow but it's important to know how I am supposed to download these users information. Taking into account that these requests have a daily limit, what would the app do with a user with millions of followers?
I hope that some of you have faced this issue and can give me some advice. Thanks!
I would like to realize an iPhone app with Facebook OpenGraph to push user activities directly in Facebook (for this part, it's OK). BUT, I would like to show friends activities for the same verb. In dev Facebook documentation, I don't find API to get friends activities...
Any ideas ?
GET /me/{namespace}:{action-type}
GET /me/{namespace}:{action-type}/{object-type}
Don't forget to ask for the permissions firends_actions:namespace
Namespace = namespace of your app
Find friends with the app (this gives you a nice tidy list)
Option 1. Use Fql.query so you can apply filters and get back only what you need...
Fql.query POST
SELECT uid, name, pic from user where uid in (select uid2 from friend where uid1=me()) and is_app_user=1", #"query
option 2. Use opengraph and get back a mother list of friends with their ID any fields you want to read (installed status shown)
GET me/friends&fields=installed
Then use the Friends list to download their {action-type} executions
Option1. Enumerate through your friends activity with this and then bare it all:
GET /friend_id/{namespace}:{action-type}
option 2. Force the user to browse the list of friends with the app...
They choose the friend and then ->
GET /friend_id/{namespace}:{action-type}
They get a list of that users last 25 actions.
It's how instagram works when you browse.
The thing we all want is to just have a feed with the last 25-50 actions by friends. Just like the activity plugin. At this point it seems like there is no way to get it. I spent hours searching and everyone ends up saying you need to do it manually on your own server. I wouldn't be surprised if this activity function is added to the graph sdk eventually. It's a reasonable request.