How to configure jarain engage plugin?

Discussion in 'WordPress' started by whiteshadow18, Jan 6, 2011.

  1. #1
    I have the site daily newspaper, i have installed the plugin jarain engage and i have created the applications for twitter and facebook, installed the api and everything. The problem is that i don't know what is a callback url, do i have to create another login php besides wp-login, what code should i put in the php?
     
    whiteshadow18, Jan 6, 2011 IP
  2. whiteshadow18

    whiteshadow18 Peon

    Messages:
    378
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    create a file named login.php or rpx php, or how do you want it to be called and paste the following content:
    
    <?php
    // Below is a very simple PHP 5 script that implements the RPX token URL processing.
    // The code below assumes you have the CURL HTTP fetching library.
    
    $rpxApiKey = 'REPLACE_WITH_YOUR_RPX_API_KEY';
    
    if(isset($_POST['token'])) {
    
      /* STEP 1: Extract token POST parameter */
      $token = $_POST['token'];
    
      /* STEP 2: Use the token to make the auth_info API call */
      $post_data = array('token' => $_POST['token'],
                         'apiKey' => $rpxApiKey,
                         'format' => 'json');
    
      $curl = curl_init();
      curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
      curl_setopt($curl, CURLOPT_URL, 'https://rpxnow.com/api/v2/auth_info');
      curl_setopt($curl, CURLOPT_POST, true);
      curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
      curl_setopt($curl, CURLOPT_HEADER, false);
      curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
      $raw_json = curl_exec($curl);
      curl_close($curl);
    
    
      /* STEP 3: Parse the JSON auth_info response */
      $auth_info = json_decode($raw_json, true);
    
      if ($auth_info['stat'] == 'ok') {
      
        /* STEP 3 Continued: Extract the 'identifier' from the response */
        $profile = $auth_info['profile'];
        $identifier = $profile['identifier'];
    
        if (isset($profile['photo'])) {
          $photo_url = $profile['photo'];
        }
    
        if (isset($profile['displayName'])) {
          $name = $profile['displayName'];
        }
    
        if (isset($profile['email'])) {
          $email = $profile['email'];
        }
    
        /* STEP 4: Use the identifier as the unique key to sign the user into your system.
    This will depend on your website implementation, and you should add your own
    code here.
    */
    
    /* an error occurred */
    } else {
      // gracefully handle the error. Hook this into your native error handling system.
      echo 'An error occured: ' . $auth_info['err']['msg'];
    }
    }
    ?>
    
    Code (markup):
    don't forget to replace with your api key
     
    whiteshadow18, Jan 6, 2011 IP
  3. whiteshadow18

    whiteshadow18 Peon

    Messages:
    378
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    It send me the error: "An error occured: Data not found "
     
    whiteshadow18, Jan 6, 2011 IP
  4. ListBuildingForNewbies

    ListBuildingForNewbies Peon

    Messages:
    202
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    A "callback url" is the URL of the website where the plugin has been placed. In the case of the Janrain connect plugin it's this URL: https://youruser.rpxnow.com/

    Personally, I tried integrating this plugin in my wordpress blog but it didn't work. I didn't have the patience to start investigating what went wrong so I
     
    ListBuildingForNewbies, Jan 6, 2011 IP
  5. whiteshadow18

    whiteshadow18 Peon

    Messages:
    378
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Tried to replace my sign in link with this instructions: imediazone.rpxnow.com (the callback url) but it doesn't wotk :(.
     
    whiteshadow18, Jan 7, 2011 IP
  6. whiteshadow18

    whiteshadow18 Peon

    Messages:
    378
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Does anyone know how to configure is damn plug in, because i want too, to integrated in my website. If anyone has the complete tutorial, and an example..
     
    whiteshadow18, Jan 8, 2011 IP
  7. mycheapssl

    mycheapssl Peon

    Messages:
    44
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    mycheapssl, May 16, 2011 IP
  8. devangvisaria

    devangvisaria Peon

    Messages:
    36
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    This link is not allowing me to create acount..

    Nilesh
     
    devangvisaria, May 16, 2011 IP
  9. mycheapssl

    mycheapssl Peon

    Messages:
    44
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9
    which link? what error it gave?
     
    mycheapssl, May 16, 2011 IP
  10. devangvisaria

    devangvisaria Peon

    Messages:
    36
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #10
    I'm not able to create account. It keeps on loading after I submit form later on it leads to page not available.

    Nilesh
     
    devangvisaria, May 16, 2011 IP
  11. mycheapssl

    mycheapssl Peon

    Messages:
    44
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #11
    on which site?
     
    mycheapssl, May 16, 2011 IP
  12. opeinid geek

    opeinid geek Peon

    Messages:
    6
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #12
    You can use LoginRadius to integrate social login , they offer social login service with over 20 ID Providers,without any hassle of understanding APIs or going through complex programming etc.Plugins for Joomla, Drupal, Wordpress & osCommerce are available.Other than social login, this plugin also provides User Profile Data and Social Analytics.:)
     
    opeinid geek, Jan 19, 2012 IP