[WordPress Social Login] Post to a user's wall
-
I’m trying to post to a currently logged in Facebook user’s wall/timeline after clicking a button in my WordPress template file located in wp-content/themes/mytheme/mypage.php
I found this on the plugin authors github documentation:
https://miled.github.io/wordpress-social-login/developer-api-apis.htmlI put the second snippet of code (the Facebook code) in my functions.php file.
Then on my wordpress template file: page.php, 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** (hence the ???)
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:
https://miled.github.io/wordpress-social-login/developer-api-snippets.htmlUnfortunately same problem, no idea where to get this $hybridauth_user_profile variable.
All I really want to do is just post to a users Facebook timeline/wall after logging in via WordPress Social Login, but the documentation does not seem to be very specific about
– Where to run the code (do I even need to run apply_filters?)
– How to put in the correct arguments
- The topic ‘[WordPress Social Login] Post to a user's wall’ is closed to new replies.