Twitter iOS image search by hashtag - ios

I need to search images from a certain hashtag in twitter to my iOS 6 app. I am trying to code a query that retrieves a minimal size possible response.
So, I tried to use Twitpic, but the response is not good. it's outdated and incomplete. So, I went to the Twitter 1.0 API. The 1.1 is not good because it require user account in Twitter and a lot of my users don´t have it.
http://search.twitter.com/search.json?q=%23hashtag%20pic.twitter.com&rpp=100&include_entities=true&result_type=recent
Does have a better way to query images from twitter api? I only need the image urls, not the entire entities.

As Twitter and Instagram respond a big JSON, I decided to implement the logic in a server using PHP. My client send the hashtag and the server retrieve the image´s urls and send them this parameters and the next "page_id" from twitter and facebook.
It made the operation faster and more future friendly to my apps, besides avoid some "bad images".

Related

Using Instagram Basic Display API to get user's metadata

I am currently working on an iOS-App where Instagram users can fetch their data, such as profile information and images and will be able to post. There are similar apps like Flume (https://flumeapp.com/) which are capable of accessing those features. I already managed to get the access token and fetch the basic user information.
As the Instagram Legacy API will be shut down soon, I am wondering how to fetch detailed user information, as the Basic Display API only lists fields for account type, id, username and media count (https://developers.facebook.com/docs/instagram-basic-display-api/reference/user#fields).
In both the Basic Display API as well as the Graph API it says that creating media is not supported.
Can anyone tell me how other apps (like Flume) are able to perform those actions? Are they perhaps still using the Instagram Legacy API?
Thanks!

Replacement for Twitter RSS API?

I'm currently using Twitter's RSS API (example) to retrieve people's tweets for an app. However, once version 1.1 of their API comes out, I won't be able to do this anymore. What's a simple replacement I can use for this?
Unfortunately the answer is: "There is none."
Twitter continues to lock down their platform, as they have since the switch to OAuth. If you want to add content to Twitter, you can do that easily. If you want to get content out of Twitter, well, you'll have to conform to Twitter's requirements.
RSS was an easy way of getting content out of Twitter, and so they killed it. They'll tell you that it wasn't really used, but that's a load of bull and they know it, but it sounds good and most people will simply swallow it.
There is a workaround that you can use until March 2013:
https://api.twitter.com/1/statuses/user_timeline/UserName.rss
Replace 'UserName' with the actual twitter username you want.
But after sometime in March/April 2013, that will cease to work and you'll have to use OAuth and json to parse Twitter feeds.
Use Twitter RSS - Google Apps Script from github to convert Twitter API 1.1 to RSS. Using this option you can get search results, users' timelines, users’ favorites or even Twitter Lists.
I've put together two mit licensed php scripts and instructions so you can fetch and cache twitter user timelines as RSS..
The most important is to cache the tweets since you are only allowed to call the API 15 times per 15 minutes..
Have a look at twitterrss.net
I've been looking for an answer to this for a while, basically as I wanted to provide a replacement for the Twitter triggers in IFTTT. When IFTTT removed them we could use Twitter's RSS feeds. However now, with v1 of their API retired, you have to authenticate any requests and they no longer off RSS feeds. It's a shame because it's closing the door for a lot of newbie developers out there.
I'd definitely recommend checking out twitter-rss.com in the answer above, but you might want to check out a solution I've come up with. It is called Twools and it's almost ready.
Twools started off as a way to get back RSS feeds from Twitter. Twitter
retired version 1 of their API in June 2013 as well as retiring RSS feeds. As
well as not having access to RSS feeds, you need to be authenticated to use
the API which
raises the bar for Twitter users and developers. It has been my intention to
make this as easy as possible for you install, however you do need to install
this on your own website (PHP is required). It is just a case of editing a few
lines in a file (with your Twitter app details) and uploading to your website.
Twools offers a number of RSS feeds from the Twitter API:
Your home timeline
User timeline (yours or another user's)
Your mentions
Your favorites
List timeline (from a list that you own)
Direct messages received (disabled by default)
Direct messages Sent (disabled by default)
Twitter Search
New followers
New friends
You can filter the results from the Twitter API by only outputting tweets
containing certain keywords, hashtags or screen names or even by the app used
to send the Tweet. As well as that you can filter based on the user (currently
their location and language). Finally, you can modify the data outputted in
the RSS feed by removing URLs, screen names, hashtags etc or share your recipe
with other folders. As well as an RSS feed generator, Twools has a basic
direct message spam filter (experimental- use at your own risk!) and a simple
social media management tool (basically an HTML version of the RSS filters).
You can also keep an eye on your API usage on the Status page.
With Twools and your app you could
Your tweets when you mention a specific hashtag
Your Twitter Faves:
Get new followers from the a certain country or location
Get tweets when someone mentions Starbucks negatively in a Tweet in the UK
Get tweets when someone tweets to an article on your website
For more information, see http://twools.it/

iOS upgrade to twitter api 1.1

I currently have a bunch of apps that go and make simple anonymous calls to the twitter API, and grab several differing timelines. Obviously, twitter is changing things up with 1.1, and is demanding authenticated calls using oauth. Does that mean each of my users need a token (their own account) to do call, or do I need one app token for all of them? Should I be using the twitter api included with iOS 5? Note: These are not the user's timeline...just several news feeds on twitter. Am a bit confused. Any pointers would be appreciated.
This is a good question, I struggled with this myself.
You can use Twitter API client via PHP and then json_encode the user timeline you want and parse it. This is not the best practice, but is a work around I had to do for an app on which I wanted to only display tweets no other action was need, like getting links, retweets, etc.
hope this serves.

How to download Facebook page posts

I am an iOS developer and I am writing an app which needs to take statuses from my Facebook page and and display them in my app.
Does the Facebook API support that?
If it does, can anyone give a link for some tutorials or explain how can I make this?
I know that API supports an RSS feed but i don't found how to feed my statuses.
If you're using a Facebook page, you can easily use the graph API to query for posts made by that page. For example, for Starbucks:
http://graph.facebook.com/Starbucks/posts
You can simply load this in your browser to see the format the data comes back in, and all that's needed to access this data is a simple HTTP request. You can replace Starbucks with your Page's ID or username to get your Page's posts. These come back in JSON, which should be fairly easy to handle on your end.
Yes, the Facebook Graph API allows you to access your profile and extract any information you'd like from it.

Twitter feed on corporate site

I have a corporate website that I want to pull in tweets to, but i'm getting a rate limit using the http feed. So, I want to use an authenticated method to get the tweets.
Do I really have to register an application to do this, even though it's not really an application and my users will never be entering or changing the twitter account info.
Also, my corporate site doesn't have a public address, and registering an application through twitter appears to require a public url. So how can I get around this? Do I have to create a "fake" application with a public url, just to generate my keys?
Thanks for any help on this.
If your site is behind a proxy server along with all your users, using Javascript/jQuery won't help. All the requests will still be coming from the same IP and will hit a rate limit, as you're doing now.
The other issue is that you don't need to register an app to request a feed. Apps are only needed for Oauth, and getting a feed doesn't need that.
The best way to deal with this is to get the feed with a server script, store it on the server, and then deliver the server copy to the web pages. If you request the feed less than 150 times per hour, you won't have a limit problem.
If you want more than a single feed, you can use the streaming API to get all the tweets for up to 400 keywords or from up to 5,000 users. This still doesn't need a registered app, since the streaming API still allows Basic Auth.
Just wanted to post this for future reference and in case anyone else has the same question. The solution to my problem, was to register an application on twitter. But since I'm just using a single user, you don't have to do the regular OAuth steps of generating a request for a key, getting the response etc. Every app you register in twitter get's its own "Access Token" that you can use to retrieve tweets etc. So, this is what I ended up doing to solve the problem I was having.
Additional details: My main concern was having to do the OAuth steps of requesting an access code etc... Since my application is only a single user implementaion (just pulling in our company related tweets from company held twitter accounts), it just seemed unneccesary to have to do all of that. But what I found was that when you register an app on twitter, you get a private access token for each app. You can view a little information about that here: https://dev.twitter.com/pages/oauth_single_token.
It sounds like you are pulling the feed down over http on the server? You could just limit the updates so you don't hit the rate limit.
I would recommend instead doing this on the client side. There are a lot of very easy to use embeddable java script twitter clients out there. The rate limiting problem would dissapear as the feed would be coming from the desktop and not the server (unless they just kept refreshing it).
The Twitter developer wiki lists a few.
JQuery plugin for Twitter
Tweet (another JQuery plugin)

Resources