I'm not sure why that wouldn't work to see if the user has connected their account to Facebook. If the user hasn't connected their account, what value are you getting back? If they have connected, what value are you getting back? The return value should be the user's social network ID. In general, this is usually a number.. so something like the below should check if the user has connected or not:doesn't work in case of reconnection..am I right or there something else is wrong in settings?
if (!JFBCFactory::usermap()->getProviderUserId($jUserId, 'facebook') )
echo "User is not connected";
There's no difference between "connected" and "reconnected". If they have linked their account to Facebook, they have connected it to Facebook.I juest need to check IF the user is connected with facebook or reconnected with facebook
$reg_exUrl = "/(http|https|ftp|ftps)\:\/\/[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,3}(\/\S*)?/";
preg_match($reg_exUrl, $fieldData, $match);
$url=substr($match[0],0,-6);
echo '<a class="about_fb" href="'.$url.'" ><img class="" src="/images/socialicon/facebook.png"></a>';
Join our newsletter to get alerts for Joomla releases, tips and tricks and extension updates.