Topic-icon beginner questions

Support Specialist
9 years 3 months ago #50455 by alzander
Replied by alzander on topic beginner questions

doesn't work in case of reconnection..am I right or there something else is wrong in settings?

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:
if (!JFBCFactory::usermap()->getProviderUserId($jUserId, 'facebook') )
  echo "User is not connected";
What code are you using?

I juest need to check IF the user is connected with facebook or reconnected with facebook

There's no difference between "connected" and "reconnected". If they have linked their account to Facebook, they have connected it to Facebook.

Alex
The topic has been locked.
Active Subscriptions:

None
9 years 3 months ago #50469 by alfredopacino
Replied by alfredopacino on topic beginner questions
don't know where my mistake was..I've just rebuild from 0 my code using yours and now it works :)
The topic has been locked.
Active Subscriptions:

None
9 years 3 months ago #50471 by alfredopacino
Replied by alfredopacino on topic beginner questions
the only think I would solve is the fact the facebook profile url field prints an anchor tag..basically for format properly the icon I have to do this (profile.about.php page)
$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>';

kind-of-ridicolous :rolleyes:
I guess it's some jomsocial 'text replacement' plugin is annoying me.. maybe the same who replaces each text field with a link, for searching for other users with the same field value..
It's not JFBConnect related, but maybe you can give some advices about this strange thing..
The topic has been locked.
Support Specialist
9 years 3 months ago #50476 by alzander
Replied by alzander on topic beginner questions
I'm not sure why the Facebook Profile URL has an anchor tag. Is the profile URL stored in the database like that, or is it just when printed?

Boiling it down, I'm not sure why it's like that. If JomSocial is altering the printing of a value that looks right in the database, you'll need to contact them to help determine why or how to correct it.

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
9 years 3 months ago #50483 by alfredopacino
Replied by alfredopacino on topic beginner questions
here the db field
www.diigo.com/item/image/51ynl/92nc

here the profile page
www.diigo.com/item/image/51ynl/jkpr

not sure about the jomsocial substitution plugin, actually checking a little better the page profile.about.php I'm pretty sure there isn't such a plugin for that..
basically I can't figure it out where this substitution comes from
The topic has been locked.
Support Specialist
9 years 3 months ago #50497 by alzander
Replied by alzander on topic beginner questions
I'm not sure either, but it's not from JFBConnect. My guess is that you have the field in JomSocial set to "Link" or something like that and they're doing it. I'd change it to "Text" and then it should output it directly and you can alter it however you want.

If that doesn't help though, again, you'll need to contact JomSocial for further assistance.

Thanks,
Alex
The topic has been locked.