Notifications
Clear all

wpDiscuz with SNAP

4 Posts
4 Users
0 Reactions
2,986 Views
(@luciano)
New Member
Joined: 9 years ago
Posts: 4
Topic starter  

I´m using with SNAP (Next Scripts: Social Networks Auto Poster) and Buddypress. SNAP import comments from Facebook and Twitter for my blog, but can´t bring avatars and links of users, I think because of some conflict with wpDiscuz. Could sameone help me? SNAP give the following answer to the problem:

Plugin uses only standard WordPress APIs for inserting comments.

it fills comment_author_url
It hooks get_avatar WP function for it's comments to grab avatars from Facebook.


   
Quote
 Tom
(@tomson)
Famed Member Admin
Joined: 10 years ago
Posts: 4214
 

Hi luciano,

Please deactivate wpDiscuz and check if the default comment system can get those data (avatar / URL). We need make sure those data are available for  default comment functions. Also please leave some URL to allow us check it.


   
ReplyQuote
Vladimir
(@vk)
Member Customer
Joined: 9 years ago
Posts: 14
 

I have the same problem.

If I deactivate wpDiscuz plugin and use native wordpress comments - all is ok, the avatars for comments imported from Facebook are shown. But if I activate wpDiscuz plugin  - they hide. Have you an issue for this problem? Thank you.


   
ReplyQuote
(@neomail)
Member Customer
Joined: 8 years ago
Posts: 1
 

Hello same problem here, when i disable wp-discuz on all our website it show facebook avatar, snap use a function to filter get_avatar

 

here is the function : 

if (!function_exists("ns_get_avatar")) { function ns_get_avatar($avatar, $id_or_email, $size=96, $default='', $alt='') { 

    if ( is_object($id_or_email) ) { 

      if ($id_or_email->comment_agent=='SNAP' && stripos($id_or_email->comment_author_url, 'facebook.com')!==false) { $fbuID = str_ireplace('@facebook.com','',$id_or_email->comment_author_email);        

        $avatar = "<img alt='{$id_or_email->comment_author}' src='https://graph.facebook.com/v2.3/$fbuID/picture' class='avatar avatar-{$size} photo avatar-default' height='{$size}' width='{$size}' />";              }

      if (stripos($id_or_email->comment_agent, 'SNAP||')!==false && stripos($id_or_email->comment_author_url, 'twitter.com')!==false) { $fbuID = str_ireplace('SNAP||','',$id_or_email->comment_agent);

        $avatar = "<img alt='{$id_or_email->comment_author}' src='{$fbuID}' class='avatar avatar-{$size} photo avatar-default' height='{$size}' width='{$size}' />";        

      }

      

    }

    return $avatar;

}}

 

and the filter called : 

add_filter('get_avatar','ns_get_avatar', 10, 5 );

can you help me to fix that problem ?


   
ReplyQuote
Share:
Scroll to top