Reputation: 139
I have the following code:
<div class="fb-send" data-href="http://www.mywebsite.com/here/?ref=<?php $current_user->ID; ?>" data-size="small"></div>
I am trying to append the current user iD to the link and have that link shared via messenger, however when the messenger share button is clicked it only shares "http://www.mywebsite.com/here/?ref="
Oh and I also have the Javascript SDK included on the page before the <body>
tag
Upvotes: 0
Views: 156
Reputation: 1079
Try this
<div class="fb-send" data-href="http://www.mywebsite.com/here/?ref=<?=$current_user->ID?>" data-size="small"></div>
Upvotes: 0
Reputation: 3864
You just forgot to echo your variable :
<div class="fb-send" data-href="http://www.mywebsite.com/here/?ref=<?php echo $current_user->ID; ?>" data-size="small"></div>
Upvotes: 2