In my android application, I am using tweet feature and I am using as explained in http://www.mobiledevelopersolutions.com/home/start/twominutetutorials/tmt5p1. It is not working in version 4.0.3 android device. The childbrowser is not getting opened. I am using cordova-2.0.0 but still it's not working. May I know the problem?
Regards
Ashwini
For twitter login page to get opened, your device must be set to current date and time properly otherwise, it doesn't open. Because, we need to pass current timestaps to get request_token. Check once.
Related
As we know, there have been changes in access to the twitter API referring to callbacks URLs.
So far, I have been using the identification callback with firebase, as I indicated here:
This has been working perfectly so far.
I read in the documentation that now you have to indicate the callback, according to android or iOS in the following way:
twitterkit- : // if using Twitter Kit for iOS or
twittersdk: // if using Twitter Kit for Android.
My application is only developed for android.
I have tried all the possible variants, but I always get the following error:
The client application failed validation: Not a valid callback URL format.
The tested options have been:
twittersdk://pfa89MGYola62VIln ........ (MY_CONSUMER_KEY)
twittersdk://MY_APP-android.firebaseapp.com/__/auth/handler
twittersdk://https://MY_APP-android.firebaseapp.com/__/auth/handler
I have activated and deactivated the check "enable callback locking" ...
I've tried everything, I'm a little desperate
For another test, I tried to register the URL callback as if it were the iOS platform
twitterkit-MY_CONSUMER_KEY://
and it was accepted on the first attempt.
I do not mind losing the relationship with firebase, the truth is that I was not using it, but I have a serious problem if I can not connect with twitter again.
I appreciate any help.
I found the solution, I put it here in case it can be of help to someone.
The truth is that it is not well specified in the documentation, you have to take two steps.
First: activate the "enable callback locking" checkbox
Second: indicate the android sdk for twitter, WITHOUT CONSUMER KEY, unlike iOS users.
It would be like this:
I hope it helps
I'm building a meteorjs app and deploying it as a native (cordova) app for Android and iOS.
I need to deep link to my app, so I can launch it by following a link on a website.
I've implemented URL Scheme using the cordova plugin by Eddy Verbruggen (https://github.com/EddyVerbruggen/Custom-URL-scheme) and I managed to get my app launched by following a link of the "myapp://" format.
The problem is that, even though the app is getting successfully launched, the handleOpenUrl hook is not getting triggered.
Meteor.startup(function() {
handleOpenURL = function handleOpenURL(url) {
console.log("received url: " + url);
// parse url and proceed accordingly
}
});
Nothing gets logged. So I have no way of passing any parameters to my app, or even detect that the app was launched via a link that follows the 'myapp://' URL scheme.
Also, I noticed that even though my app is already open, if I switch to the browser and click on a special "myapp://" link, instead of switching to my (already open) app, a new instance of the app is getting launched.
[edit] Turned out the two problems were related. Once I prevented a new instance of the app from being initialized, the handleOpenUrl function was triggered successfully.
I'm using the Android emulator for all my tests. I haven't had the chance to test on iOS yet.
[edit] iOS didn't give this problem at all. It was only an Android problem.
If anyone out there has any experience on implementing custom URL scheme in meteorjs, your feedback is much appreciated!
I managed to fix the issue I was facing. Here is the solution, for anybody else who is facing similar problems.
First of all, it was only occurring on Android. iOS had no problem whatsoever to launch the app and trigger the handleOpenUrl function.
The two issues that I was facing on Android turned out that there were related to each other. The fact that a new instance of the app was triggered every time, prevented the handleOpenUrl function from being triggered.
Both problems were fixed by adding a single line of code on the mobile-config.js file:
App.setPreference("AndroidLaunchMode", "singleTask");
I am trying to integrate the ok.ru sdk for an iOS game following these instructions.
The app is created on the website following instructions mentioned here. But when I try to post something, I get the error message
"Indicated redirect_uri is not registered in App Settings.
redirect_uri:ok1139715840://authorize"
The problem is that the redirect uri contains the app id that is obtained only after app creation.
According to this link, the redirect uri needs to be mentioned when creating the app. I cant even go back and edit the app settings as when I click on the app, it says "Page not found".
Has anyone successfully integrated this sdk?
Can some instructions be provided (in english) on how to do this successfully and get rid of the current error??
The same error will arise with the android sdk as that also a redirect uri as shown in the link above.
Go to odnoklassniki API page, and chan your application url to "http://localhost" while you developing.
Once it's in production then change with your site.
API page : http://apiok.ru
Finally figured out:
You have to scroll to the bottom of the page and then you will find an App Settings button. Click on it, enter your application secret and then you will be able to edit the app settings.
Just go to the app settings in Odnoklassniki and add ok1139715840://authorize to accepted redirect_uri list
I am a newbie and devleoping an app which uses facebook login and the details which we get after logging from facebook for further interactions. Two days back it was running fine but today it stopped running its just showing CURRENT GOALS screen and no button to do ok or cancel or anything of that sort. Just see this link
https://m.facebook.com/dialog/oauth?redirect_uri=fbconnect%3A%2F%2Fsuccess&display=touch&type=user_agent&client_id=307234779396415&ret=login&ext=1368864103&hash=AeZ9mMBQfC22WXj_&refid=9&_rdr
I am using the Facebook Dialog class to achieve the login but in the facebook sdk also the graphSampleApi sample project is running with same problem.
Please help I need to the login badly and my project deadline is today. Please help.
Thanks in advance.
try this simplier URL for log in ::
https://www.facebook.com/dialog/oauth?client_id=307234779396415&redirect_uri=https://www.facebook.com/connect/login_success.html&display=touch&scope=publish_stream
See my answer on this similar/duplicate question: FbDialog doesn't show full content on smaller devices
Basically, it looks like Facebook changed the code in these web dialogs and something in their javascript is not executing properly on some Android devices. The Cancel/OK buttons are there in the page content, but hidden, and the javascript is failing before the buttons are shown.
You can inject JavaScript to hide the "Current Goals" until FaceBook fixes their API.
See my answer here for details:
webDialog "CURRENT GOALS" header but no button to authorize or cancel
In my application I am using facebook authentication.My code looks like
var win1 = Titanium.UI.createWindow({
title:'Tab 1',
backgroundColor:'#fff',
layout:'vertical'
});win1.open();
Titanium.Facebook.appid = "appid";
Titanium.Facebook.permissions = ['abc'];
var facebook_button = Ti.UI.createButton(
{
height:50,
width:200
});win1.add(facebook_button);
facebook_button.addEventListener('click', function(e)
{
Titanium.Facebook.authorize();
});
var facebook = Titanium.Facebook.createLoginButton({
style:'wide',
bottom:80
});
win1.add(facebook);
Titanium.Facebook.addEventListener('login', connect_facebook);
function connect_facebook()
{
alert('inside');
Titanium.Facebook.logout();
}
Now problem occur when I click on facebook_button. When I install application on android device(version 2.2) I click on facebook_button it causes forced close of application. after forced close If I again start application and use same functionality it's working fine.My log records gives following error java.lang.NullPointerException.
if I use titanium facebook button i.e. Ti.Facebook.createLoginButton it's not giving any error even on first use also. But I want to use my own customize log-in button.
I want to remove this null pointer exception. I am using android sdk 2.0.1. and tested on android device 2.2.On simulator application running without any error.Is there any way to solve this problem? need help.. thank you..
I have no experience in connecting to Facebook from Titanium, but installed one of their new example apps two days ago: https://wiki.appcelerator.org/display/guides/Example+Applications#ExampleApplications-ARti
This connects to FB, do not know in what way. You can download example code from GitHub, maybe you find it useful.
Besides, in my experience the older Android SDK versions you are using have some issues. I have better experiences using 2.3 and newer. Recently compiled an app with SDK 4.x and have it running on a device with 2.2, so no problems with backward compatibility. Maybe it helps to upgrade your SDKs.