...

View Full Version : Unable to Link from Facebook Wall Post back to Website Comment Box



Bobafart
05-01-2011, 02:05 PM
Hi there,

I test posted a post from my website at this test link:

http://www.junctional.com/1/Independent-Affiliate-Networks-vs-Large-Affiliate-Networks/

(I am using mod-rewrite for my URLs). I used the following code to get the URL of the page:


<script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><fb:comments href="<?php echo "http://" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; ?>" num_posts="100" width="650" colorscheme="dark"></fb:comments>


The comments post fine on the site and the comments also post fine on my facebook wall. The only problem is that the link from my facebook wall back to the website adds the "fb_comment_id" to the URL so the comments no longer show up because the URL has changed now that facebook has added this parameter. The new URL now looks like this:


http://www.junctional.com/1/Independent-Affiliate-Networks-vs-Large-Affiliate-Networks/?fb_comment_id=fbc_10150581353070591_20769083_10150581375875591#f2b5ac26a


I assume the problem is with the PHP code I am using to get the current URL. How can this problem be solved? Try posting a comment and testing it for yourself please.

thanks!

(I also posted in the dev FB forums.. no one can answer so I thought I would try here.. thanks)

dniwebdesign
05-01-2011, 07:50 PM
If you don't really need the fb_comment_id try linking back to

echo "http://" . $_SERVER['HTTP_HOST'].''.$_SERVER['PHP_SELF'];

Good luck in the dev forums of FaceBook. I've never had too much success there with getting my questions answered.

Bobafart
05-02-2011, 01:29 AM
If you don't really need the fb_comment_id try linking back to

echo "http://" . $_SERVER['HTTP_HOST'].''.$_SERVER['PHP_SELF'];

Good luck in the dev forums of FaceBook. I've never had too much success there with getting my questions answered.
Hi there

I appreciate your advice. What I am trying to explain is very difficult... it looks like I didn't explain it properly.

If you go to my profile wall:
http://www.facebook.com/drdel

and look for the first post on the wall and click the link: "Independent-Affiliate-Networks-vs-Large-Affiliate-Networks" it takes you back to my website but with the irritating parameter in the URL: "?fb_comment_id=fbc_10150581353070591_20769083_10150581375875591#f1de71922"

I want to get rid of that URL parameter. The problem is facebook adds it automatically.

How do I get rid of it?

Bobafart
05-04-2011, 04:44 AM
help pls?

Inigoesdr
05-04-2011, 05:33 AM
You wall isn't publicly accessible. You can't remove that URL param from Facebook if they are adding it to the links on their own page. You can redirect people that have that parameter to a page without, in effect stripping it, but the initial request will have it.

modelaid
05-12-2011, 03:53 AM
I have the same issue.

I've post the situation in my blog (http://bit.ly/kTukTD). (written by Korean, but I think you can check it up.)

I think that this issue can solve 'RewriteRule' in '.htaccess' in server root folder.
Check the '?fb_comment_id=xxxxx' using Regular Expression, get rid of the issued code and Redirection URL.

but I can't coding Regular Expression, I'm trying to find it.

If you can find something, let me know please.

richardabelc
06-02-2011, 03:12 AM
Me parece que ese problema siempre va ha estar ahÝ, a nos ser que Facebook, deje de enviar ese fb_comment_id.

Esperemos que Facebook haga algo al respecto.

alel_0502
12-05-2011, 06:59 AM
Maybe you can use my solution:
your code for fb:comments:


<script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><fb:comments href="<?php echo "http://" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; ?>" num_posts="100" width="650" colorscheme="dark"></fb:comments>


you can change it to;


<?php
$url_now="http://" .$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
list($url_new,$fb_id)=split('fb_comment_id', $url_now, 2);
$url_now=str_replace("?","",$url_new);
?>
<script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><fb:comments href="<?php echo $url_new; ?>" num_posts="100" width="650" colorscheme="dark"></fb:comments>


maybe it can't remove fb_comment_id variable on your address bar but it can fix fb:comment

please tell me if it works.

regards

alel_0502



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum