Topic-icon How to change "Content Plugin - Like" url

Support Specialist
11 years 7 months ago #27001 by alzander
I was wrong. I just looked at the code, and you'd actually want to make the following change to that file which should work for you:

Please change:
static function getStrippedUrl()
    {
        $href = JURI::current();
to:
static function getStrippedUrl()
    {
        $href = JURI::current();
        $href = str_replace('http://YOURURL.com/', 'https://apps.facebook.com', $href);
Hope that helps,
Alex
The topic has been locked.
Active Subscriptions:

None
11 years 5 months ago #27733 by andbal1
Hi, now i need do same thing also for {JFBCComments}, i mean change first part of url with apps.facebook.com/appname/
tx

PS i have jfbconnect 4.2 and my new subscription is with user andbald2
The topic has been locked.
Active Subscriptions:

None
11 years 5 months ago #27780 by andbal2
Hi, any advices about this? is it clear? best regards
The topic has been locked.
Support Specialist
11 years 5 months ago #27823 by alzander
Andrea,
Sorry for the delay. The bare {JFBCComments} tag actually calls the same getStrippedUrl function. Have you tested the comments module to see if it works for you with the same change as mentioned above for the Likes?

Let us know if not, and we can gladly look into it further.

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

None
11 years 4 months ago #29293 by andbal2
Hi, this is a great solution to hide real application url (domain) and share "facebook link".
you have right it works for i like, comments, send and requests but using alphauserpoints, i mean jfbconnect plugins for facebook tools, users share not real url and so points don't change following users actions. is there a solution to integrate jfbconnect plugins for alphauserpoints considering this need? tx and best regards
The topic has been locked.
Active Subscriptions:

None
11 years 4 months ago #29350 by andbal2
Hi, maybe it's not easy to explain, did you understand my need? any news about this? tx
The topic has been locked.
Support Specialist
11 years 4 months ago #29385 by alzander
Andrea,
Sorry, I'm not sure I understand the problem. Our Alpha User Points plugin simply detects when a Like button has been clicked, and notifies AUP of the action. If the points aren't being recorded, regardless of URL, I don't think it's a JFBConnect issue. There's nothing in our code that checks to make sure the Like'd URL is actually from your domain.

I'm not sure where things are failing, and I'm really unsure how JFBConnect would be preventing the awarding of points.

Can you revert the change you made and test with the AUP integration some more to see if it really is working with the 'real' URLs for your site?

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

None
11 years 4 months ago #29411 by andbal2
hi, tx for your reply. i've done some tests disactiving url rewrite. also with standard url it works just with "send request tool", i mean rules for i like and comment doesn't work. any idea to solve the issue?
The topic has been locked.
Active Subscriptions:

None
11 years 4 months ago #29433 by andbal2
Hi i found the issue, points are added to users just if i active content plugin in social tab, i mean "Content Plugin - Like" and "Content Plugin - Comments" tab, setting positions top, bottom, both, none.

unfortunately i can't use them because:
1. url rewrting works just adding tags {JFBCLike} and {JFBCComments}
2. in my app i used these tags in templates to integrate jfbconnect to joomshopping

i hope to share with you good information, please let me know if you have an idea to solve it, tx again
The topic has been locked.
Support Specialist
11 years 4 months ago #29439 by alzander
Can you undo that setting that is making it work, and then look at the source HTML. Do a search for:
FB.Event.subscribe('edge.create', jfbc.social.like.create);
If that's not there, that's the reason. At some point, we began to always add that setting in the code, which will trigger things on any Like click. It's definitely in the 4.3.x release of JFBConnect. I'm not sure if it's in 4.2.x. If it's not there, you may want to upgrade. If you can't upgrade, I'm sure we could help you with the change to force it as it's a very simple change.

Hope that helps get you going, and great sleuthing to find the problem,
Alex
The topic has been locked.