mercredi 4 février 2015

Wordpress Social Login > Post to a users Facebook wall


I'm trying to post to a currently logged in Facebook user's wall/timeline.


I found this on the plugin authors github documentation: http://ift.tt/1zAQPYn


I put the second snippet of code (the Facebook code) in my functions.php file.


Then on one of my wordpress template files, I did this:



apply_filters('wsl_hook_process_login_before_wp_set_auth_cookie', get_current_user_id(), "Facebook", ???);


The thing is, I have no idea what I need to put in place of $hybridauth_user_profile


When I var_dump that variable:



global $hybridauth_user_profile;
echo "HELLO WORLD: ";
var_dump($hybridauth_user_profile);


It comes back as NULL in my template file (located in wp-content/themes/mytheme folder).


I also tried to just get the access token so I can just use the Facebook API directly from this document: http://ift.tt/1AsLcyi


Unfortunately same problem, no idea where to get this $hybridauth_user_profile variable.





Aucun commentaire:

Enregistrer un commentaire