I am working with twitter SDK to integrate with in ios app.When i follow all the step and create the customer key and put it in my app.When I run the app it show
"[TwitterKit] did encounter error with message
"Error obtaining user auth token.": Error Domain=TWTRLogInErrorDomain
Code=-1 "Callback URL not approved for this client application.
Approved callback URLs can be adjusted in your application
settings" UserInfo={NSLocalizedDescription=Callback URL
not approved for this client application. Approved callback URLs can
be adjusted in your application settings"
How to resolve this?
I had the same problem and the TwitterKit documentation is not accurate or Twitter has changed their policies. In any case, on the Twitter Apps site, the callback URL has to be set very specifically. The callback URL should be in the format:
twitterkit-{consumer/api key}://
For example:
twitterkit-128238aKjqlp123AKdasdf://
Also, this needs to be registered in your Info.plist exactly the same:
<dict>
<key>CFBundleURLSchemes</key>
<array>
<string>twitterkit-128238aKjqlp123AKdasdf</string>
</array>
</dict>
More documentation is listed here: https://developer.twitter.com/en/docs/basics/callback_url.html
I just added on callback url field twitterkit-<api/consumer Key>://.
If you have an apiKey like abc you should add twitterkit-abc://. This work for iOS, for Android just add twittersdk://.
To Fix this issue do as below:
[Mandatory]
Add CallbackURL into the dashboard as below format:
For iOS:
twitterkit-CONSUMERKEY://
For Android:
twittersdk://
Help Link:
https://twittercommunity.com/t/ios-twitter-login-error-code-415/107775
[ Note: Please replace your consumer key in place of words "CONSUMERKEY" in above format]
My solution: I hope it's useful.
Go to https://apps.twitter.com
Then in the "Settings" tab of your app.
Fill the "Callback URLs" form.
According to this documentation i guess you just have to enter a valid URL :
https://github.com/twitter/twitter-kit-ios/wiki/Installation
NOTE: Although the callback URL will not be requested by Twitter Kit in your app, it must be set to a valid URL for the app to work with the SDK.
Hey everyone here is a simple fix that worked for me.
Go to: https://apps.twitter.com
Go into the settings tab.
Under Terms of Service URL uncheck the box that says:
"Unable Callback Locking"
Now test your app.
Finally I found the solution for my case. Hope it'll help someone else
Put this in URL Callback field.
twittersdk://
Refer: https://github.com/twitter/twitter-kit-android/issues/135
Related
I have follow this tutorial (https://devdactic.com/ionic-2-push-notifications/#disqus_thread)
I do not receive notification (status sent on ionic.io) on physical iOS Device with TestFlight. (But the token is generated).
app.component.ts and app.module.ts file: https://pastebin.com/HB97KdWL
I have try official tutorial but same problem..
Thank you in advance !
So, there are a bunch of things that could go wrong, especially with ios. Here are some things to look at:
Managing the certificates for the APNS can be rough. If you have
access to an android device, start there since it's a little more
straightforward to get notifications up and running.
Since you're using apps.ionic.io, you have the advantage of checking
to see if you have a push token assigned to a user. (I'm assuming
that you're using auth?) In the Auth tab, select the
user->View->check the push tab to see the token. Also, use the push
service to send a generic push notification to the users to see if
it arrives.
If you have a problem with ios, there's a strong likelihood that
there's something wrong with the certificates... so check for
another tutorial on that. I'd recommend using the Ionic Cloud Services website instead of Devdactics since Ionic is more in-depth. You can find it here: https://docs.ionic.io/services/push/#prerequisites
Make sure that the "Background Notifications" and "Push
Notifications are selected on the General tab in the Xcode project.
Since you're using Ionic, changing anything with 'cordova platform
add ios' can overwrite it. Make sure it looks like this: ![enter
image description here]3
This might be an oversight?...in your code, you have this:
const cloudSettings: CloudSettings = {
'core': {
'app_id': 'XXXXXX' **<-- this should be a value. (not XXXXXX)**
},
'push': {
'sender_id': 'XXXXX', **<-- this should be a value. (not XXXXXX)**
'pluginConfig': {
'ios': {
'badge': true,
'sound': true
},
'android': {
'iconColor': '#ff0000'
}
}
}
};
app_id is something that is covered in the tutorial that you sent. It's under the IOS certificate section. It says, "After going through the Push guide you need to have your App Id from the Identifier you created inside your Apple profile. Copy that ID and open your config.xml and add your ID:" This is the same ID that you'll put in that section of code.
Unfortunately, there are a lot of things that can go wrong with the certificates. I would focus there since the errors that you get can be unannounced.
I have integrated Account kit sdk in to my project.
I created the application on facebook development dashboard, enabled Account Kit on it. Got app-id and client access token.
I added it into info.plist file. I am getting this error:
[AccountKit][Error]: Invalid OAuth 2.0 Access Token
2016-05-31 02:41:32.191 Chat[2919:563260] [AccountKit][Error]:
Persisting App Events due to error:
Error Domain=com.facebook.accountkit:Error Code=200 "(null)"
UserInfo={com.facebook.accountkit:ErrorDeveloperMessageKey=Invalid OAuth access token., NSUnderlyingError=0x147596a30
{Error Domain=com.facebook.accountkit:ServerError Code=190 "(null)" UserInfo={com.facebook.accountkit:ErrorDeveloperMessageKey=Invalid OAuth access token.}}}
Please need help. Thanks
Make sure you have the correct settings in info.plist.
I had a similar problem and in my case it was missing a key FacebookAppID
<key>FacebookAppID</key>
<string>{your-app-id}</string>
<key>AccountKitClientToken</key>
<string>{your-account-kit-client-token}</string>
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLSchemes</key>
<array>
<string>ak{your-app-id}</string>
</array>
</dict>
</array>
Make sure that initialization response type of AKFAccountKit matches with your application dashboard configuration.
It can be:
accountKit = [[AKFAccountKit alloc] initWithResponseType:AKFResponseTypeAccessToken];
or
accountKit = [[AKFAccountKit alloc]initWithResponseType:AKFResponseTypeAuthorizationCode];
This might be an issue with your configuration. You can file a bug report with Facebook here including your token information: https://developers.facebook.com/bugs/
I got this error when I had copied the wrong AccountKitClientToken into the Info.plist. Got the right one in there and everything is working now!
You can add your client token using AKFSettings.setClientToken("MY TOKEN") and make sure to import AccountKit at the top of the file where you call this.
I would like to use the paypal sideloader api to integrate PayPal Here as described here:
https://github.com/paypal/here-sideloader-api-samples/blob/master/docs/README.md
There are several things I am not sure how it works. Can someone help me understand it/point me in the right direct?
To launch the PayPal Here, you use the following url:
paypalhere://takePayment?
accepted=cash,card,paypal
&returnUrl=my_registered_location://takePayment/{result}?Type={Type}&InvoiceId={InvoiceId}&Tip={Tip}&TxId={TxId}
&as=b64
&step=choosePayment
&payerPhone=4155551212
&invoice={ ... json snipped ... }
How exactly do "open" this paypalhere:// schema? I would ideally like to have a button on my view called Pay via PayPal Here and when clicked, execute the above.
Secondly, notice how there is a returnUrl? This is a custom url schema for my app. Firstly, how do I register my own url schema (e.g. myapp://) and then implement the method takePayment to get the payment response data?
Thanks in advance for any help & tips.
Yes, you are correct, add a button and call a function like
function handlePaypal(){
if (Ti.Platform.canOpenURL("paypalhere://")) {
Ti.Platform.openURL("paypalhere://"+ yourstring);
}
...
}
However you need to add this schema to your tiapp.xml file
<ios>
<plist>
<dict>
<.....>
<key>LSApplicationQueriesSchemes</key>
<array>
<string>paypalhere</string>
</array>
<....>
</dict>
</plist>
</ios>
EDITED
To handle de URL response, you will need to handle the open event as following:
If your App is designed for Android also, you will need to read the receiving intent data like below, as you are using Alloy, you need to put at app/alloy.js
if (OS_ANDROID) {
Alloy.Globals.receivedURL = Ti.Android.currentActivity.intent.data;
}
And finally at the beginning of your index.js
$.index.addEventListener('open', function (e) {
if (OS_ANDROID) {
handleResponse(Alloy.Globals.receivedURL);
} else if (OS_IOS) {
//Here we have two cases: App was closed or App still running;
handleResponse(Ti.App.getArguments().url);
Ti.App.addEventListener('resume', function () {
handleResponse(Ti.App.getArguments().url);
});
}
});
After all, you can develop your handleResponse function :)
The receiving parameter it will be the URL from the another app,now you only need to parse.
--
As an alternative, since version 5.2, Titanium supports the Hyperloop [beta] module. You can use it to integrate the native paypal-ios sdk to your Titanium App. Maybe it will be more better documented and easy to maintain. You can install using CocoaPods, and access directly via Hyperloop. If you have interest this is a good start point: How to use Hyperloop in your Titanium App
First let me say I really sorry for asking a question about facebook.
I'm trying to use open authentication to login in users on my site but I cannot find where to register my application/website on facebook. What is the url?
update
I've done that but get this:
our account must be verified before you can take this action. Please verify your account by adding your <a onclick="var newwindow = window.open("http:\/\/www.facebook.com\/confirmphone.php",'confirm_phone', 'height=350, width=520, left=100, top=100, resizable=yes, scrollbars=no, toolbar=no, status=no');if (newwindow) { newwindow.focus();} else { alert("A pop-up blocker may be disabling the the mobile verification window.");}">mobile phone</a> or credit card.
update
If you get that link you need to paste this into the URL if it doesn't popup.
http://www.facebook.com/confirmphone.php",'confirm_phone&%23039;,%20&%23039;height=350,%20width=520,%20left=100,%20top=100,%20resizable=yes,%20scrollbars=no,%20toolbar=no,%20status=no&%23039;);if%20(newwindow)%20&%23123;%20newwindow.focus();&%23125;%20else%20&%23123;%20alert("A%20pop-up%20blocker%20may%20be%20disabling%20the%20the%20mobile%20verification%20window.");&%23125;
update
Then I have to join this group
http://apps.facebook.com/developer/
And when I do it says it's no longer there.
update
Ok finally got to a link somehow after register my phone.
http://developers.facebook.com/setup/
www.facebook.com/developers
Goto this URL and register your profile as a developer first. Then create a new application.
If you are able to do that successfully, then comment back for the further steps.
Has anyone encountered the following error message when sending to Twitter?
"Error: Incorrect signature"
And on the debug console:
<0xf14cf80 SHKTwitter.m:(356)> Twitter Send Status Error: {"request":"\/1\/statuses\/update.json","error":"Incorrect signature"}
So far as I can tell I've followed the install instructions on http://www.getsharekit.com/install/#download and it is working with Facebook, e-mail etc. just not Twitter.
It would be great if someone has seen this error before and goes "aha!".
All I did to enable twitter Sharing is:
Regitered my App as a Twitter APP (Application Type: Browser)
#define SHKTwitterConsumerKey #"My..."
#define SHKTwitterSecret #"My..."
#define SHKTwitterCallbackUrl #"http://www.anything.com/callback" // You need to set this if using OAuth, see note above (xAuth users can skip it)
\#define SHKTwitterUseXAuth 0 // To use xAuth, set to 1
\#define SHKTwitterUsername #"" // Enter your app's twitter account if you'dlike to ask the user to follow it when logging in. (Only for xAuth)
Note that for the callback function you can enter any URL you want. even www.google.com. Just make sure it is the same URL in your code.
The issue is that you're signed into your twitter account, and allowed the app to connect to your profile.
However, days go by, the Key and Secret change, and now you're seeing this error. It's because you have to log out and re-log back into Twitter. I spent waaay too much time finding this out when I created a new Twitter App to hook into (and organize my apps) and found this error.
Basically, ShareKit is saving your login info, auto-logging you in, and getting the error when twitter says the app doesn't have permission to connect to your profile.
Follow these steps to log yourself out and test again :
http://www.getsharekit.com/docs/#logout
Check this previous SO question, it might be able to help you solve the problem:
Twitter API status update always returns "Incorrect signature"