Jump to content

social links (facebook)


Nuvish

Recommended Posts

I have a problem with a module.

 

In mymodule.php i have,

 

$title = $meta['meta_title'];

$link = 'http://'.$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];

 

And in my tpl i have ,

 

<li class="facebook">
       <a target="_blank" href="http://www.facebook.com/sharer.php?u={$link}&t={$title}">{l s='Facebook'}
       </a>
</li>

 

This works fine in the product page,but it doesnt work in my homepage.

Can anyone help me with this?

 

I have tried every solution,even hard coding the "u = " and the "t= " but it just won't work :(

This has been bugging me for a while.

Link to comment
Share on other sites

Yes,$smarty->assign('link',$link);

 

and i used it in my tpl file as such,

 

<li class="facebook">
 <a target="_blank" href="http://www.facebook.com/sharer.php?u={$link}&t={$title}">{l s='Facebook'}</a>
</li>

 

It works fine in product.php page,i can post my link. But it doesnt on my homepage.

 

When i click on the link on my homepage, the sharer opens,where i can click on post,but the page link that i want to share(homepage) should also appear,but it doesnt..even so if i click on share,it says - The message could not be posted to this Wall.

 

Do you have any idea?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...