Redirect url does not match registered redirect url in instragram - iphone

i am using this libray https://github.com/crino/instagram-ios-sdk after login we getting one error
we created app in instrantgram like :
i have add URL scheme to my application's plist file
how to solve this issue please help me

i got my mistake
Redirect url ig3213f9bbab4841aba216996a24e9138e://authorize

It is clearly stated in the Instagram iOS SDK documentation that the URL Scheme needs to be structured as:
ig[clientId]://
So in your case:
ig3213f9b...
Will not work, try
ig32313...://

You are using OAuth and you are trying to run it on browser.
What you are missing is your OAuth Token, Please check if its there when you hit the API in your code.
May be it can help you..

set the call back url like this:

Related

How to redirect from Yahoo to my IOS app after authentication?

I am working on an app where I have to use Yahoo account to login.
I had gone through this link and followed the procedure as it was there.But I am unable to get back to my app after authentication.After googling I found an answer here.Here he said that "Add an URL Scheme in your info.plist file with the YOUR_APP_ID_OR_BUNDLE_ID" I did the same,but unable to redirect from yahoo to my app.If any one worked on this please help me.Thanks in advance.
This is what I had done in my URL Schemes
where JCzOzd44 is my app ID.
In yahoo account while creating the app.what should I give in "Application Domain"
I didn't work with the Yahoo! API yet, but in oauth it works like that:
Create an url scheme in your app. You can do that in the Info section of your project settings (URL types). Name the scheme whatever you want, for example your app id.
When you authenticate your app, you can pass a parameter named oauth_callback. Here you have to pass the name of the just created url scheme.
This should be it - when the login is ok on the Yahoo side, it will try to open the app that is registered for the url scheme it got as callback parameter.
UPDATE:
From the Yahoo! API documentation - this is the call you do when requesting the oauth token somewhere in your code (I filled in your url scheme as the callback, this is how it should look like):
https://api.login.yahoo.com/oauth/v2/
get_request_token?oauth_nonce=ce2130523f788f313f76314ed3965ea6
&oauth_timestamp=1202956957
&oauth_consumer_key=123456891011121314151617181920
&oauth_signature_method=plaintext
&oauth_signature=abcdef
&oauth_version=1.0
&xoauth_lang_pref="en-us"
&oauth_callback="JCzOzd44://"
Of course the request should be signed.
I have found the solution though with a little overheads.
Steps are: 1> Create a PHP script in you own server (say named, YRedirect.php).
2> Paste the following code in it-
CODE
<?php
$query = $_SERVER['QUERY_STRING'];
header("Location: com-mycompany-myapp://oauth-response?" . $query);
>
Where "com-mycompany-myapp" is your bundle identifier
3> Add an URL Scheme in your info.plist file with the YOUR_APP_ID_OR_BUNDLE_ID. That's it and you are DONE with the authentication problem.
In your code
[self.session sendUserToAuthorizationWithCallbackUrl:#"http://yourdomain.com/YRedirect.php"];
Then, register a custom URL scheme for your iPhone application from your Info.plist file, and then setup your server side script to redirect Safari back to your application via the URL scheme you just set up.
Thanks for this valuable information. Following your instructions I got the auth & call back working and the php page loads the app.

Can we modify short link created by google url shortner?

By mistake I have uploaded the application on the App Store without changing the URL for Facebook.
This is the url which is being shared : goo.gl/7wK2
and it redirects to: https://itunes.apple.com/us/app/tap-tap-balloon!/id535053777?mt=8
Can we do something so that the same URL (goo.gl/7wK2) will redirect to: https://itunes.apple.com/us/app/find-a-thing/id638627376?mt=8?
Is this possible via the Google URL shortener API or by any other method?
I think you can not.
You have to create another short url and then republish your application
I think you can not, because the url is derived from what we send to goo * le server.
If you want to change, you must send or submit your new url to goo * le.
You can surely do it using tiny.cc. I have used it and was working fine easily.

"Website: Not a valid URL format" when creating an application of twitter

I'd like to create an application that can integrate with Twitter.
So I went to the website: https://dev.twitter.com/apps/new to create an application.
But the WebSite: field always failed. It said that "Website: Not a valid URL format".
I tried different "valid" URLs, but failed.
Do you have any ideas on the twitter application?
Thanks in advance.
Michael
I was trying to set localhost URL and got the same error message.
After replacing
http://localhost
http://localhost/twitter/callback
with
http://127.0.0.1
http://127.0.0.1/twitter/callback
it let me saved my test application
Mine is working. Save it in this format http://url.com. Even this domain.com works.
You can try doing it in a different browser, logout and login.
In my case the problem was in trailing whitespace from copy/paste.
One easy mistake to make is both the callback url and website need to start with http://
This worked for me:
WebSite: http://example.com
CallbackURL: http://example.com/auth/twitter/callback/
I'm able to make applications if I include "http://" at the beginning. Also it might be something browser related (I'm using Chrome) so check that.
I was having the same Issue, then after googling, someone said that:
"I think your website and callback should match. Some examples:
website: http://www.quoteicon.com
callback: http://www.quoteicon.com/twitter/callback "
summarizing the field callback has to be prefixed with the website, otherwise it gets error that the URL is invalid!
and they dont accept local IPs to the webSite fields.
It worked for me, hope this help you.
Old question but I ran into this today. Twitter does not allow localhost or IP addresses in the URL (plus it does require http:// or https:// as a prefix).
However this doesn't help with local debugging.
So an easy workaround is to add something like myapp.here.com in your /etc/hosts file
127.0.0.1 myapp.here.com
and then enter http://myapp.here.com and http://myapp.here.com/auth/twitter in the fields.
That should allow local debugging. It is odd as Facebook makes this a bit easier and it seems like a common task for debugging these types of integrations.
You could even override your actual domain locally if you wanted to use the same Twitter App ID.
Be aware of localhost, if you are developing on local machine. Twitter doesn't allow url with http://localhost:3000 or without http.
I'm wonder, why ;] Hope, They will add it.
I just found that I didn't have a problem with my callback url at all, but the error message was for the Website url!
Tried everything now, eventually only https://example.com/auth worked.
I simply added www and the error was gone.
Previously
http://twitter.com/...
After
http://www.twitter.com/...
This issue is resolved when I give my Website & Callback URL same htt://URL.Hope it will help to resolve your solution.

Flogin registration redirect problem

Hi
I have Facebook register in my website. I have integrated it completely without any bugs and the values are stored in the database.After the successful registration , it doesn't redirect to the exact url that i have mentioned below.
header("location:http://www.facebook.com/dialog/oauth/?scope=publish_stream&client_id=yyyyy&redirect_uri=".SITE."business.php?action=favouriteshare&id=".$bid."");
It always through invalid url details.Could anyone please suggest some ideas to get this redirect correctly.
Try the following:
wrap the redirect url with quotes '
use the urlencode() method.
The scope parameter is not yet supported. Please vote this ticket to make it happen.

Codeigniter Facebook app POST method AND query_string

I have a toy facebook app I'm playing with so I can understand how it all works. It's fine if you go the the app like this: http://apps.facebook.com/pushup-challenge/ (and connect it). But if you then go to it from your facebook page, FB uses the URL http://apps.facebook.com/pushup-challenge/?ref=bookmarks.
In my log file, I see that FB is POSTing the data and including the /?ref=bookmarks to it's call to my codeigniter system. This is causing it to either say "invalid URI parameters" or give me a 404, depending on if I've edited the system/core/URI.php file to add rawurlencode() to a particular call.
I've tried using mod_rewrite to get rid of the query_string, too, but since it's POSTing, it doesn't appear to be working (though I'm not exactly sure why).
Has anyone else run into this? How did you fix it?
Thanks in advance,
Hans
try $config['uri_protocol'] = “PATH_INFO”; and set enable_query_strings = TRUE
or
set
$config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-?=';
in config.php
Because it isn't calling your file by name (just ?ref=bookmarks) the server runs thru the standard default files: index.htm, index.html, index.asp. Because you need to accept a POST, you need a server that allows POSTs to htm & html if you choose to use those. Index.asp will accept POSTs on most servers, and that works for me.
SOLUTION: Add a file (index.asp), that calls the real app that you named in the App settings.