Integration Opauth with Wordpress

24 views
Skip to first unread message

Simon Lam

unread,
Sep 17, 2015, 10:24:03 AM9/17/15
to Opauth
Dear U-Zyn,

Thanks for creating this great framework. 

I am working on Wordpress project with Facebook & Weibo login and want to integrate this framework with Wordpress. I try it locally or through sub-folder, it works for authentication. 

However, Wordpress has it's own folder structure. Is there any guideline that I can implement this framework under Wordpress folder structure? Or if anyone who has apply this framework to Wordpress. It would be very thankful for any guideline for this. 

Besides, I also face a problem which I have set the scope of retrieving Facebook information. Facebook recognise this setting but it fails to retrieve those items from callback function. I provide the codes below. Is there any mistake I made? Appreciate a lot if can get more advice/guideline. Thanks in advance! 


I change through the following FacebookStrategy.php  

public function request(){
$params = array(
'client_id' => $this->strategy['app_id'],
'redirect_uri' => $this->strategy['redirect_uri'],
'scope' => 'email, user_birthday'
);

and return the values through. But it doesn't work. 

$this->auth = array(
'provider' => 'Facebook',
'uid' => $me->id,
'info' => array(
'name' => $me->name,
'image' => 'https://graph.facebook.com/'.$me->id.'/picture?type=square',
'email' => $me->email
),



Best Regards,
Simon

 



Reply all
Reply to author
Forward
0 new messages