Submitting Instagram to iOS app - ios

I'm new to the site and new to developing so I'm looking for some general advice here.
I'm looking to build and app which works along side Instagram. So this is what I want to be able to do to start with.
User opens app and can submit an already posted (and held on Instagram) photo to the app. The user at this point will need to be asked to log into their Instagram account. So for example they would select submit and it will open a window asking them to log into Instagram and then it will display all their available photos which they have posted.
User selects the post they wish to submit to the app.
Image displays on app in a gallery of submitted posts by all the other users for people to see.
Thats the basic premise. It's actually a lot more involved than that but I am learning and trying to keep it simple at the moment.
What I would like to know is. Is this possible, are there any guides which exist on how to do this.
What sort of process will I be looking at here. I've tried looking for posts on Instagram integration etc but I can't find anything similar to this.
Thanks in advance any help or pointers on where to even start will be helpful.
error instagramdemo

Stpes to integrate instagram:
1)https://www.instagram.com/developer/
You would have to create an application on the instagram developer portal, get a client ID for performing OAuth flow.
2)Ask your users to login to the instagram app and get the auth_token from instagram API.
3) Use the auth_token in all your requests basically.
4) Download code from here: https://www.sendspace.com/file/mnuqck
and replace your clientid in my code. you will get response in code.

These libraries should help you get started,
https://github.com/shyambhat/InstagramKit
https://github.com/crino/instagram-ios-sdk
You would have to create an application on the instagram developer
portal, get a client ID for performing OAuth flow.
Ask your users to login to the instagram app and get the auth_token
from instagram API.
Use the auth_token in all your requests basically.
The whole flow would have been implemented for you in the libraries I mentioned.
Say for example if you are using InstagramKit and after integrating/authorisation by the user getting images from the users feed would be as simple as below,
InstagramEngine *engine = [InstagramEngine sharedEngine];
[engine getSelfFeedWithSuccess:^(NSArray *media, InstagramPaginationInfo *paginationInfo) {
// media is an array of InstagramMedia objects
...
} failure:^(NSError *error, NSInteger statusCode) {
...
}];
Steps to get InstagramKit up an running,
Download the InstagramKit from github.
Make sure you have cocoapods installed on your mac, refer
https://cocoapods.org/ for help.
Open the InstagramKit-Example on terminal and run the following
command,
pod install
Wait for the pod to finish its magic.
Now you should have InstagramKit-Example.xcworkspace created in the InstagramKit-Example, open it and run.
I just did it now,

Related

How to get followers list from Twitter?

I am trying to call following Twitter's API to get a list of followers for a user.
http://api.twitter.com/1.1/followers/ids.json?cursor=-1&screen_name=username
And I am getting this error message in response.
{
code = 215;
message = "Bad Authentication data";
}
I can't seem to find the documentation related to this error code. Anyone has any idea about this error?
Your request lacks authentication data. I got that error when I simply clicked on http://api.twitter.com/1.1/followers/ids.json?cursor=-1&screen_name=username. This is not the way to access twitter API.
Create a Twitter app from https://apps.twitter.com/. Then, try using a Twitter API Library to access REST API. If you are comfortable with using ruby apps on command line interface check out https://github.com/sferik/t. Set it up and then try t followers [USER] for listing all followers of USER.
You will have to use OAuth. More info can be found on Twitter website. Here: https://dev.twitter.com/oauth
This error is coming because your Twitter developers account is not approved. Now-a-days you can't make app without getting your developers account approved from Twitter.
To make an app, you need to contact Twitter and apply for developers account. If you are lucky engough, you will get approval although this process may take months.
If you just need the data, go for third party services like followersanalysis[dot]com, birdsonganalytics[dot]com

Instagram api not returning any followers although response code is 200

I am using instagram to recieve the list of people i follow and although api returns the status code 200 I recieve absolutely no data.I tried using postman client instead of my code and even from there no data is being returned I am hitting the following service.
https://api.instagram.com/v1/users/self/follows?access_token=token
one thing to be noted is my application is in sandbox mode and this same access token is working and fetching other information about the user including media shared by the user and its basic information etc and user follows and is followed by several users.
Please suggest the solution thanks in advance.
I may have answer to this question since I was facing the same issue on my WinRT project yesterday.
You may need the relationship scope instead of 'follower_list' scope.
I am assuming that you have provided the scope as 'follower_list' in the authorization URL and logged in as yourself or through your own Instagram account(the same account with which you have created your Instagram app). And now if you are hitting the above service it will return nothing in data since you are requesting if the user is following you or not(so obviously you are not following yourself)!! So if you try logging in with someone else's Instagram account and hit the above service with follower_list scope it will return your Instagram account in data if the logged in person is following you.
EDIT
The above service will return all the users that are following you AND present in your sandbox users list. (Or at least that is my conclusion on this)
For further clarification try https://apigee.com/console/instagram for hitting this service there they are using the relationship scope.

ios flickr api: Flickr callback URL not being called

I'm attempting to hook my application into Flickr but having issues during the Authentication process.
I've followed instructions in:
https://github.com/devedup/FlickrKit
I've created a CFBundleURLTypes for my application (let's call it myapp://) and tested that it works (i.e. I type myapp:// in a safari). I've successfully called the authentication URL in Flickr, it shows the login, asks the user to grant my app the necessary permissions then instead of redirecting back to my app via my URL...it does nothing, and the app is not authenticated.
I used FlickrKit demo app replacing its api key/secret/CFbundleUrltypes with mines and the issue is the same, so the problem is not in the code but rather in the way i registered my app in flickr. Said that...I just followed the instructions in Flickr "Edit Authentication Flow" so I guess the issue is with the callback url I put in flickr. I used myapp://auth? as described in many posts in the internet but does not authenticate or call back my app.
This is not the same issue reported here:
Flickr Authentication Flow and iPhone
but rather similar to the unanswered post:
flickr callback URL not working
The Info.plist for the custom URL handler and the AppDelegate code are a copy&paste from the flickrKit demo app [no need to reinvent the wheel] and anyway even after changing api key secret and url in flickrKit demo app with mines...the app is not called back, so it must be something wrong in my app registration.
Anybody experienced a similar behavior ? i ruled out objective-c code and callback url as the issue, so what is left is the flickr part but not sure where to look for help... so i wrote this post.
Thanks for any tip,
dom
Probably this is a problem of api signature calculation. All the parameters passed via method should be used to calculate an api signature.

Twitter Oauth in windows phone 8 app

I need to use Twitter Oauth to login my windows phone app,
What i need exactly is
1)when the user click twitter log in button from my app, i need to show the twitter llog in page in a browser,
2)when he enters his credentials and accept the app, then i should get the user information like, name, gender, bday, what ever i can take.
That,s it, then i can close the browser and make my app active.
I just need to make the user to log in via twitter.
I referred lot of examples, that are all quit confusing and doing all the stuffs in twiiter.
I tried this example
and got this error
'TweetSharp.TwitterService' does not contain a definition fError 2 'TweetSharp.TwitterService' does not contain a definition for 'GetAccessToken' and no extension method 'GetAccessToken' accepting a first argument of type 'TweetSharp.TwitterService' could be found (are you missing a using directive or an assembly reference?)
and i tried enter link description here
failed on that too.
Can anybody help me to do the authentication via twitter for my app.
Thank you.
I tried this example and got success, I contacted the person who have posted that example and got help from him to solve the issues raised from this example.
Actually this Example works fine for twitter integration,
What you have to do is
1)Register your app in twitter, here the link for app registration,
log in and register your app.
2)Make sure you have given the Call Back URL(i forget to give that, and that makes me face lot of issues)
3)Note down the Consumer Key, Consumer Secret and Call back url(we need specify this 3 in our code)
4)Go to Settings, and set your app access to Read and Write
5)down load the above link and change the Consumer Key, Consumer Secret and Call back url as per your app, and then run the example, it will work fine.
Thank you.
If you just want to authenticate using Twitter and don't want to post anything, perhaps you can try Azure Mobile Service Authentication. You can find more information here: mobile services authentication

Twitter and Facebook for Socialize

I'm trying to get Twitter and Facebook to work on Socialize for my iOS app. I've followed the steps on Socialize's website up until the "Linking to existing credentials" area (Twitter: http://socialize.github.io/socialize-sdk-ios/twitter.html, Facebook: http://socialize.github.io/socialize-sdk-ios/facebook.html). When I run the app, it successfully builds but Facebook and Twitter still do not show up as options for sharing. I have a feeling there's some small part I'm missing but can't figure it out. Does anyone know if maybe there is something that Socialize does not mention in the guide that may need to be done or some other possible answer?
Thanks,
David
you have to put the following in the app delegate, or another place, follow the documentation:
[SZFacebookUtils setAppId:#"YOUR FB APP ID"];
[SZTwitterUtils setConsumerKey:#"YOUR_TWITTER_CONSUMER_KEY" consumerSecret:#"YOUR_TWITTER_CONSUMER_SECRET"];
http://socialize.github.io/socialize-sdk-ios/facebook.html
http://socialize.github.io/socialize-sdk-ios/twitter.html

Resources