1

When I am using Instagram sharing then how can I get username and password from Instagram (current login user).

$app = new UEApp(self::APP_SECRET, self::APP_SECRET);
$user = new UEUser($this->currentUser->unification_userkey, $this->currentUser->unification_usersecret);
$con = $access_token."@instagram.com/?username=rajneesh49&password=test&@instagram.com";

Now I am using static password and username then its working fine but How can I get current username and password(required filed by unification engine)

username and password both are required fields by unification engine.

How can I get this password and username in php code for unification engine sharing.

Authentication only provide this information

Array
(
    [access_token] => 4544942713.7da612b.4de7a5a78fba2b27a60dc1749d
    [user] => Array
        (
            [id] => 45434542713
            [username] => rajneesh8469
            [profile_picture] => https://scontent.cdninstagram.com/t51.2885-19/s150x150/16229522_1877141895853233_7596497588304478208_a
.jpg
            [full_name] => Rajneesh
            [bio] => Testing website
            [website] => http://localhost:3000/
  ))

But only password is missing so how can I get current user password.

2 Answers2

0

We could see that you can now specify optional parameters while you add a connection, with the updated version of SDK (https://github.com/unifiedinbox/ue-php-sdk).

The optional params for each connections are specified in documentation under 'Add connection' section https://developer.unificationengine.com/ In case of instagram, the optional params are "username" and "password".

AMT.in
  • 391
  • 1
  • 5
  • We are able to get current username but any social sharing not provide current user password this my problem. Any API not proving any user password. –  Feb 28 '17 at 13:55
  • Instagram doesn't provide password while authentication process. You should build your own app level logic to get the password. – AMT.in Mar 01 '17 at 04:58
  • Yes its fine, but any person will not share password with any website. So unification engine not go for Instagram sharing. So we need to find the other API instead of unification engine. –  Mar 02 '17 at 09:04
0

This problem not related with any code or unification its only related with Security validation. I have fixed same issue in same sharing but I have fixed this problem by authentication please do below some changes as per application

  1. Create Instagram authentication
  2. Get username (only username authentication not providing password)
  3. Open User validation popup in exiting application (then show username and and asking to user please enter password)
  4. Please do not save user password in you database (its related with security)
  5. Then use same parameters for sharing

Only change this according to password:

$con = $access_token."@instagram.com/?username=".$username.'&password='.$password&@instagram.com";

please do this as per security social networking proving good security as per application(Instagram is good as per security) .

Kuldeep Raj
  • 791
  • 1
  • 7
  • 29