php - Making Facebook Like Button Display a Variable on Wall after Like Button is Clicked -
I'm using a Facebook Like button. This works, showing my domain name and an image from my site. But I would also like to display the Like buttons: at I think you can depend on it $ submissions on the volume how can I do it?
echo & lt; Div class = "like2" & gt; '; Echo '& lt; Script src = "http://connect.facebook.net/en_US/all.js#xfbml=1" & gt; & Lt; / Script & gt; & Lt; Fb: such as href = "http: //www.domain .com / directory / directory / fblike.php? Submissionid = '. $ Submid.' & Amp; Submission = '. $ Submissions.' & Amp; uid = '. $ Uid.' "Send =" true "layout =" button_count "Width =" 150 "show_faces =" false "font =" arial "& gt; & Lt; / Fb: Like & gt; '; Echo & lt; / Div & gt; ';
www.domain.com/directory/directory/fblike.php :
& lt ;! DOCTYPE HTML Public "- // W3C // DTT XHTML 1.0 Transcription // N" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> & Lt; Div class = "hslogo" & gt; & Lt; A href = "http://www.domain.com/directory/" & gt; & Lt; Img src = "image / image.png" alt = "name" range = "0" /> & Lt; / A & gt; & Lt; / Div & gt; & Lt; Html xmlns = "http://www.w3.org/1999/xhtml" & gt; & Lt; Top & gt; & Lt ;? Php session_start (); $ Submid = $ _GET ['Submitted']; $ Uid = $ _GET ['UID']; $ Submissions = $ _GET ['Submissions']; ? & Gt; & Lt; Meta http-equiv = "content-type" content = "text / html; charset = UTF-8" /> & Lt; Title & gt; & Lt ;? Php echo urldecode ($ submissions); ? & Gt; & Lt; / Title & gt; & Lt; Meta Property = "OG: Title" Content = "Page Test Like Fb" /> & Lt; / Head & gt; & Lt; Body & gt; & Lt ;? Php mysql_connect ("server", "username", "password") or die (mysql_error ()); Mysql_select_db ("database") or die (mysql_error ()); Counterparty deposit; $ Q = "Include in FBLX Value (zero, '$ sumed', '$ UID', tap)"; $ R = mysql_query ($ q); If voted ($ r) // // Resonance "success!"; } Elseif (! $ R) // voting failed {// echo "unsuccessful!"; } Header ("Location: index.php? Submission =". Urlencode ($ Submissions). "& Amp; Submit =". $ Submid "& amp; uid =". $ Uid. ") ;? & gt;
Comments
Post a Comment