LinkedIn Connect for Appcelerator Titanium

Recent Changes (all changes available in the same gist as another revision)

  • Modified the LinkedIn connect for new share API
  • Modified the Twitter connect part for new captcha verification, now user need to input the captcha in provided textbox he/she is seeing on screen

Hello everyone,

Recently I had a use-case to implement the Linkedin Connect with Appcelerator SDK, but unfortunately I’m unable to find the any plug-in or module to do that. I was already using one Titanium widget called social.js which is used to connect with twitter, though Twitter and Linkedin uses OAuth for the Authentication I planned to make some modifications on the Social.js, you can find the modified social.js CommonJS module here (https://gist.github.com/4320296). Require this module and you can easily authenticate with Linkedin and Twitter as well, by that you can post the contents to Linkedin and Twitter. Use the following code after importing social.js in your code base.

this social.js module is commonjs pattern so just require it by

LinkedIn Example

 

Twitter Example

remember you have twitter.deauthorize(); and linkedin.deauthorize(); functions are available to deauthorize

Social.js By – Ramkumar M

  • Djamel

    Hi, this module doesn’t work on Android…can you help me to resolve the problem please ?

    thanks

    • Ramkumar Murugadoss

      Hey Djamel, this module will work for Android too.. What is the exact problem you are facing…?

  • Guest

    objec [object object ] has no method twitter.shareImage error while posting image in android

  • Muhammad Adnan

    works perfect ,great work (y)

  • Nishanth

    Hi,

    Social.js is working but am facing one problem. If I click close button the first winodw closed but second window is not closing. Please any one guide me to solve this issue.

    • http://shareourideas.com/ Rish Movva

      Hi Nishanth,

      Can you please provide me code, if possible.
      I am talking to @ramkumar author. we will get back you soon.

      Thank you,
      Naga Harish.

      • wpccolorblind

        Seeing this exact problem as well. The code is exactly what is in the twitter example on this page.

    • Simbu

      Hey Nishanth,

      Have you fixed the second window not closing issue..?if yes please help me to resolve this as i m also facing this.

      • stefan

        Hi SImbu,

        Could you resolve the problem with the ‘second window not closing’. Since your post is the most recent one I ask you. I’m facing exactly the same problem

        • Simbu

          Hi Stefan,
          I have not used this module file. i just used the web view by setting url to tweet message on twitter,

  • n3h@

    Hi,

    social.js is giving me error:

    [ERROR] Script Error = invalid method (createProgressBar) passed to UIModule at social.js (line 550).
    Can anyone help me??

  • Waqas Khan

    Can this be used in Non Allow project in Titanium

    • http://shareourideas.com/ Rish Movva

      Not Tried, But surely we can use it.

      • Waqas Khan

        Thanks.

    • Ramkumar Murugadoss

      @disqus_9g47Plu6V0:disqus it should work

  • Guest

    How do I get the user email from linkedin and twitter?

    • Moussa Sarr

      I have been asking the same question for so long now but either no one knows or people do not want to answer

  • Ravindra Chaitanya Prasad Mukk

    Hi Ram, I tried the process what you mentioned above. But still I am getting an error like below :

    ERROR] : Social.js: FAILED to getRequestToken!

    [ERROR] : oauth_problem=timestamp_refused&oauth_acceptable_timestamps=1443531929%2B-900

    When I launch the application I got an error alert with a message “Did not get access token now” and from there application is not working. Can you share the possible solution for this. Is there any other way to share data on linkedin with out using social.js

    • http://shareourideas.com/ Rish Movva

      Did you try this :

      FYI: https://gist.github.com/rampicos/4320296#gistcomment-1458966
      Because of the API update of linkedIn you need to modify the URL on line 724

      from: requestToken : “https://api.linkedin.com/uas/oauth/requestToken?scope=rw_nus”,

      to: requestToken : “https://api.linkedin.com/uas/oauth/requestToken?scope=w_share”,

      Also adjust the permissions in the linkedin app.

    • Ramkumar Murugadoss

      @ravindrachaitanyaprasadmukk:disqus can you check the timezone settings (and time settings) of your mobile.. The oAuth fails if the timezone mismatches with your mobile and data timezone.. Kindly try and let me know..

  • Moussa Sarr

    How can I retrieve the user name, email and the like to display in his profile once authenticated ?

  • Eagle Developers

    Is this obsolete?

    • http://shareourideas.com/ Rish Movva

      It seems Out date… I contacted with @ramkumarmurugadoss:disqus . He is planing to update it, in his free time..

    • Ramkumar Murugadoss

      Hey @eagledevelopers:disqus check the gist and let me know

  • Ramkumar Murugadoss

    Hey everyone, I updated the social.js and it is available on the same gist link.. Updates include for LinkedIn & Twitter, Which works fine to me.. For Twitter added a Textbox where the user need to input the captcha shown to the user by twitter Thanks @nagaharish:disqus

    • http://shareourideas.com/ Rish Movva

      Thank you dude for share the code for us….

    • Eagle Developers

      Wow! So fast! I appreciate it very much!

    • Eagle Developers

      Using 5.0.0.GA.

      iOS can’t click on X to close window (See attached)
      iOS can’t type in linkedin’s textboxes (at least simulator).
      Android (works) but doesn’t close webviews gracefully

      • http://shareourideas.com/ Sri Movva

        Please try to change close button position styles.. I’ll also ask help from @ramkumarmurugadoss:disqus

  • Moussa Sarr

    Please answer . How do I retrieve linked profile info ?

    • http://shareourideas.com/ Sri Movva

      I am very sorry.. I will do r&d and let you know… Or I will contact ram about.. Thank you.

  • Mohit Jain

    Hi Ramkumar,
    I have used your socialjs module for twitter in titanium. It worked fine for me. I can login successfully twitter credential. But after login I need user profile information of user like email, username , profile pic etc. Can you please let me know how can I get this information.

    Thanks in advance.