Use twitter API to aggregate multiple specific twitter feeds? - iphone

I am an intermediate level programmer with almost no web experience. I have an idea for an iPhone app and am trying to figure out if it is a feasible project to pursue.
I am thinking of building an application that groups certain specific twitter feeds together into an app. I am wondering if anyone has done this before, and if it is possible to use the twitter API to retrieve specific tweets without having a user have to log in.
The user will not be replying to or responding in any way to the links, rather just opening the links.
Thanks.
Jamie

Any public twitter feeds can be retrieved without a user authorizing their account. However you can usually only get a certain amount of tweets into the past. For instance this returns info about a user and their most recent tweets, just replace "screen_name=" with whatever name you are looking for
http://api.twitter.com/1/statuses/user_timeline.xml?screen_name=jsh2134
More can be found at the Twitter API documentation.

Related

facebook application for login and messenger same ids?

I am building a facebook messenger bot. And the bot is giving user ids. But it is not clear to me if the messenger ids are the same ids that would be returned if I use the same app and add to it a login feature. Because we already have an app and has a login feature, now we need to build a facebook bot and identify the already existing users in our db that are using the bot.
I have read facebook tutorial about linking 2 different applications to the same business to get consistent ids. But what if I use that same application to login users AND for messengers (by using the add products to the application, and so having one application, one app id) would that work? Would I be getting the same user ids?
PS: I would test myself but I am in an awkward position where the page/database/login app owner is a different person, and they are not big on sharing data, and I am supposed to blindly write a messenger code that is supposed to work when they deploy it.
All help is appreciated, thank you.
You need to use Facebook's ID Matching APIs for this purpose:
Here is the details: https://developers.facebook.com/docs/messenger-platform/identity/id-matching

multiple facebook comments, multiple tweets(multiaccount)

I am not a big expert on Facebook and Twitter APIs and I would definitely appreciate some introduction and possible guidance in my project.
This is what I am trying to do, and I wonder first of all if this is even possible.
I am building WP widget with checkbox option for user to allow generation of comment on his facebook wall and tweet with his twitter account. Comment is supposed to pick up values from custom input fields and build itself that way.
Simultaneously I want to generate post on my fb and twitter accounts regarding new user using my widget.
Is this possible to do? Could you give me links to documentation that is essential to make this one work. Otherwise what is your suggestion as a closest alternative effect.
Many many thanks!!
hmm - looks similar to your other question. I explained there how you should start with FB. With Twitter, it's very similar:
First you need to create an app: https://dev.twitter.com/apps/new
Using that app's credentials, you have to ask user to allow your app to post on user's behalf (i.e. you need to obtain an access token): https://dev.twitter.com/docs/auth/obtaining-access-tokens
After you have access token, you can use REST API to do whatever you want: https://dev.twitter.com/docs/api - including posting a tweet.
Regarding:
Simultaneously I want to generate post on my fb and twitter accounts
regarding new user using my widget.
it's no different from the above approach - but you should use your own twitter account name (or /me/ in Facebook). Of course you have to authorize your own app to do that.

iPhone App to read Facebook wall

I want to create an iPhone app that displays (among other things) a specific Facebook wall. For a good user experience I didn't want an app that required the user to have a Facebook account and I didn't want to force the user to have to log in to Facebook to see the latest "news" in the app. I started out by getting the wall RSS feed and tried parsing it ... I can "see" all the data I need ... but that is getting complicated quickly and has too many variables that are making the final results less than stellar. I have read through the Facebook iOS programming tutorials and it seems to me like the SDK forces the user log in, which I don't like.
My question ... Is there a way to use the Facebook SDK with hard coded profile credentials to access a specific wall without forcing the user to login? If possible, is that a recommended approach? Any other ways to skin this cat?
I have read through the Facebook tutorial and searched through many postings on this site but haven't found an answer to this ... sorry if this a newbie question and has already been answered.
Item I.2. of the Facebook API policy list says
You must not include functionality that proxies, requests or collects
Facebook usernames or passwords.
It sounds to me like that's what you're proposing to do; i.e., the user will be able to see a certain wall, but using hard coded credentials (not their own). In other words, your credentials are proxying for the user.
I do not know if it is technically possible to do this (I imagine it is) but I don't think it's a good idea, and I do think it's a violation of the Facebook API terms of service.
First you need to get the a access_token by parsing your app id and secret.
https://graph.facebook.com/oauth/access_token?client_id=YOUR_APP_ID&client_secret=YOUR_APP_SECRET
Then send following request to get the data you want. Note that only public data will be accessible.
https://graph.facebook.com/FACEBOOK_USER_ID/?access_token=ACCESS_TOKEN

How to simulate silent login to Facebook Graph API?

I'm working on an API that will aggregate data from several website, including facebook. The API has an engine that harvests data on regular intervals, and then the client app polls the API to get the data from all websites centrally.
The problem is that the API has no way of authenticating on the regular, behind-the-scenes harvests, as Facebook insists that the user has to click on the OAuth Dialog. With the short story being that there is no way to login to graph API silently this almost means that developing such an API is not possible (except for harvesting only public data).
However, I'm not easily satisfied by "it's not possible" answers and my clients - even less so. Accessing private information on demmand is defnitely possible as Facebook apps do that. For example, the official Twitter app posts on my wall whenever I tweet. I guess apps only need a permission once and then can access the user's profile as much as they like.
So this leads me to think that I should do a combination of a Graph API client and an application that talk to each other, and whenever the API needs to harvest - it asks the app to get the data and fetch it to the API. Or maybe it should be a push model (the app sends the data whenever it's generated) rather than pull (the API requests the data at regular intervals).
Am I on the right track? Is any of these the correct design approach?
I did some searching but it's very hard to find any useful discussion on the topic as whatever keywords I try I only find "Can I login silently? No" type of discussions.
You'll want to look into the offline_access permission. This lets you access a user's data when they don't have an active session, or are offline. That's as close to "silent login" as you can get.

How to crawl Facebook based on friendship information?

I'm a graduate student whose research is complex network. I am working on a project that involves analyzing connections between Facebook users. Is it possible to write a crawler for Facebook based on friendship information?
I looked around but couldn't find any things useful so far. It seems Facebook isn't fond of such activity. Can I rely on the Facebook API?
Update (Jan-08-2010): Thank you very much for the responses. I guess I probably need to contact Facebook directly then. Cheers
Update (Feb-16-2011): A new book, "Mining the social web", just came out. In it, there is a chapter devoted entirely for mining Facebook using Python. Cheers.
You can't rely on the Facebook API unfortunately. To get friend information, you need to use something like friends.get(). However, any Facebook API method that returns user information like this requires that you have an active session key from that user, and generally the way you get an active session key is to have the user come to your Facebook application or page.
In summary, the information you are talking about is essentially private. You can't pick a person from Facebook, get their friends, and get those friend's friends, and so on. To me this is a good thing for privacy, but of course it prevents arbitrary analysis.
I'd throw out the idea of writing a quick and dirty application with some user appeal that you could use for research. If a group like S**t My Dad Says (funny, not really safe for work) can get 120,000 users in a couple of months, you could probably plead your case with a small research application and get a reasonable amount of users.
The problem is that facebook friendship information is typically private and only accessible to friends. It should be a lot easier to build this network on Twitter, if this is an option for you.
As others have stated, this is typically private information. If, however, Facebook per se isn't a requirement, you could use Google's Social API. A snippet from the Google Social Graph API page: "With the Social Graph API, developers can now utilize public connections their users have already created in other web services. It makes information about public connections between people easily available and useful."
Here's an article on using it in Ruby:
http://articles.sitepoint.com/article/google-social-graph-api-ruby-rails#
This lifecode post provide a basic python script to scrape your facebook friends contact info.
The output of this script, is the profile ID, profile pame, profile URL, e-mail address and mobile/phone number (if provided by friend).
WARNING: This is against Facebook TOS. Use at your own risk.
Info provided for educational and research purposes
http://ruel.me/blog/2010/11/26/scrape-your-facebook-friends-contact-info-with-python/
You can use http://www.facebook.com/directory/ to get the public listed people.