tags:

views:

813

answers:

1

I am using code found in http://www.facebook.com/share_partners.php/

It says to replace with the URL I want to share.

The page where the share icon is placed is NOT the URL I want to share. The URL I want to share I enter as

However, first it worked, but now it is pulling the meta value AND the URL from the actual page!

My concern is that it is grabbing the URL from the page, not what I input because of:

u=location.href;t=document.title

On the page (both the one with the share icon AND the actual shared page) I tried to define the preview image with:

<link rel="image_src"

This is located between the tags...doesn't seem to do anything.

Thoughts?

+1  A: 

You can only change the title everything else is fetched directly from the shared url.

i dont 100% understand what you want to do

<script>function fbs_click()  {u=location.href;t=document.title;window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&amp;t='+encodeURIComponent(t),'sharer','toolbar=0,status=0,width=626,height=436');return false;}</script>
<a href="http://www.facebook.com/share.php?u=&lt;url&gt;" class="fb_share_button" onclick="return fbs_click()" target="_blank" style="text-decoration:none;">Share</a>

replace the u=location.href with u= and t=document.title with the given title. additionally replace in the href="" of the link with the correct url

any other info is fetched by the meta tags of the target url

<link rel="image_src" href="http://www.onjd.com/design05/images/PH2/WableAFC205.jpg" />

the href="" links to the correct image

the tag needs to be within those meta tags (in the area)

Andreas Klinger

related questions