Thread: [Harmattan Maemo6] Fix Native Twitter App Auth.
View Single Post
Shadow_Max's Avatar
Posts: 37 | Thanked: 57 times | Joined on Mar 2013
#1
Hi the community
So... I have found a solution to use native Twitter app.
I am actualy making an app to give an UI to fix it, but i know every user of an n9 have the hability to fix it. it is pretty simple


1- Why it do not working anymore ?
Well... The native app use the OAuth 1 Authentification to grant acces to the app.

By sign-in with the App, according to twitter workflow, you need to provide an oauth_callback,
The only unique parameter in this request is oauth_callback, which must be a URL-encoded version of the URL you wish your user to be redirected to when they complete step 2. The remaining parameters are added by the OAuth signing process.
source : https://dev.twitter.com/oauth/refere.../request_token

So it's mean the callback do not work.

After a couple of hours and some logs files parsed
i found that the callback url of the native app is swipe.nokia.com and this domain do not exist anymore
The signonpluginprocess return me this
Code:
...
Jul 25 05:49:19 (2015) signonpluginprocess: ../../src/oauth2plugin.cpp 195 mechanisms :
Jul 25 05:49:19 (2015) signonpluginprocess: ../../src/oauth2plugin.cpp 996 sendOAuth1PostRequest :
Jul 25 05:49:19 (2015) signonpluginprocess: ../../src/oauth2plugin.cpp 528 createOAuth1Header :  Signature Base =  "POST&https0X0.0AD5000048EDP-1022-0.000000-0.000000api.twitter.com0.000000oauth0.000000request_token&oauth_callback%3Dhttp                                                                                                                                                                                                                                      0X0.48EC0AEFAB2CCP-1022                                                                                                                                                                                                                                                    0.000000                                                                                                                                                                                                                                                   -0.000000swipe.nokia.com
Jul 25 05:49:19 (2015) signonpluginprocess: ../../src/oauth2plugin.
2 - How to fix ?
The callback url is call on the client side during auth process. No need to make a huge hack ! we only need to simulate that the callback URL return "TRUE" to the oauth2plugin (or succeful open an URL)
So follow the step an you will be able to use Native app again
  1. Plug your phone in SDK mode, run SDK Connectivity to enable SSH acces
  2. Open your favourite SSH client and login into your N9 with the common user (developer by default, or root if you have enable root acces)
  3. If you are logged as root go to next step or Get root accès level by login into root, or use devel-su command
    Code:
    devel-su
    rootme
  4. ping a website or google.com to get the IP adress :
    Code:
    ping -c 1 google.com
  5. note the IP
    Code:
    PING google.com (xxx.xxx.xxx.xxx): 56 data bytes...
  6. edit the /etc/hosts file with nano or another text editor
    Code:
    nano /etc/hosts
    if you do not want to use nano go to next step


    if you are not using nano, type :
    Code:
    echo 'xxx.xxx.xxx.xxx swipe.nokia.com' >> /etc/hosts
    do not forget this >>

  7. add the following line in a new line
    Code:
    xxx.xxx.xxx.xxx swipe.nokia.com
    replace xxx.xxx.xxx.xxx with the IP of google server or other who can be join with th N9 through wifi or 3G, replace xxx.xxx.xxx.xxx with the IP of google server or other who can be join with th N9 through wifi or 3G
  8. Now your hosts file look like
    Code:
    127.0.0.1 RM696 localhost
    xxx.xxx.xxx.xxx swipe.nokia.com
    replace xxx.xxx.xxx.xxx with the IP of google server or other who can be join with th N9 through wifi or 3G
Voila ! you can now try to add your Twitter account.
3 - But
Actually, The client not displaying profile picture. Maybe ther is other hidding trouble. you can leave me a message here, i will try my best to help.
I am making an app to make it user friend

Good luck all !

Last edited by Shadow_Max; 2020-05-04 at 00:35.
 

The Following 22 Users Say Thank You to Shadow_Max For This Useful Post: