gerkintrigg Posted March 6, 2011 Share Posted March 6, 2011 I know that PHP is server-side, but I wondered whether anyone had a similar issue that they got around... here's my problem... I've made a psycho-analysis tool for Facebook where it runs your Facebook friends through a database of words to get their psychological preferences (that all works)... I then have a link so that users can tell their friends about the service (it's free, so I want to get it to spread virally) but I'm having a few issues with the link... At the moment, it all works from a Facebook point of view, but when they click on the link, it takes them to an almost-blank page with a bit of code on it. I know what this code is and why it's there, but I'd like to hide it behind a branded page, ideally with Ajax. When I tried to use Ajax for it, it wouldn't accept the URL that was sent. The link has to have a URL sent to Facebook like this: https://graph.facebook.com/feed?access_token=149324721793321|HarGd6ioqoroENE9gv2758rfeYY&message=I%27ve+just+psycho-analysed+my+Facebook+friends+using+Manteya%27s+Facebook+Friend+Checker+%28http%3A%2F%2Fwww.manteya.com%2Ffacebook-friend-checker%29+so+that+I+can+communicate+better+with+you.&id=100001925276042 but for obvious reasons, you can't post it as an Ajax variable by using the: http://www.url.com/test.php?id=$variable; Is there a way I can get around the problem? I guess the issue is that Facebook needs the detail in the URL, but PHP won't let me send it like this. I have thought about uploading the URL to a database and shortening the URL, then posting that, which would then re-direct, but that's a messy way around I'm sure you smart people have done something like this before. To see my existing (almost) working example, visit http://www.manteya.com/ffc Thanks, Neil Link to comment https://forums.phpfreaks.com/topic/229742-php-action-from-a-link/ Share on other sites More sharing options...
flolam Posted March 6, 2011 Share Posted March 6, 2011 but for obvious reasons, you can't post it as an Ajax variable by using the: http://www.url.com/test.php?id=$variable; if you used urlencode (http://php.net/manual/en/function.urlencode.php) you could do it like that Link to comment https://forums.phpfreaks.com/topic/229742-php-action-from-a-link/#findComment-1183629 Share on other sites More sharing options...
gerkintrigg Posted March 6, 2011 Author Share Posted March 6, 2011 Awesome, I'll try that and let you know how it goes. Link to comment https://forums.phpfreaks.com/topic/229742-php-action-from-a-link/#findComment-1183630 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.