Open saintjab opened 7 years ago
@saintjab thank you for the comments. The real credit belongs to @perrybutler for his foundation. I simply addressed a couple request that I wanted merged since his repo went stale. In the end I actually use what I believe is a better custom solution with OAuth-Addon. I began with Perry's repo but rewrote it to from the ground up to be more extendable, so adding Instagram shouldn't be too difficult.
NOTE: This approach allows you to customize development and do much more with the OAuth token (RESTful request using oauth-addon as a conduit for the request), but if you're satisfied with the plugin as it then perhaps this add-on is not as appealing.
I will try to help with your specific question but I personally haven't deal with Instagram at all, and haven't looked into this codebase in quite some time. In addition I suggest reviewing the instagram documentation. That line was commented out because each provide script is basically a copy/paste template but each needs to be configured according to its API. For example, with a brief look it appears Instagram doesn't return the user's email in the response, here is an example of what you can use:
{
"access_token": "fb2e77d.47a0479900504cb3ab4a1f626d174d2d",
"user": {
"id": "1574083",
"username": "snoopdogg",
"full_name": "Snoop Dogg",
"profile_picture": "..."
}
}
Also, quick search leads me to believe this is the case as well: Can I get user email using Instagram API login?. Hope that helps
Thanks @Xtremefaith for the pointers. I am just getting started with web development so not very familiar with everything. I will scour the documentation and see if I can get more information for this.
@Xtremefaith thanks for this library. I am currently trying to implement Instagram Login and need access to user info. I tried uncommenting this line:
//$oauth_identity['email'] = $result_obj['emails'][0]['value'];
and even added$oauth_identity['username'] = $result_obj['username'];
from the login-instagram.php so I could get those info but still I am getting the user1 kind of username in my wpdb. Could you please point me in the right direction? I am not very conversant with php. Thanks