在html页面中使用用户ID显示Facebook图像

时间:2013-11-07 07:25:39

标签: php html

这是我的img标签,显示img

<img src="https://graph.facebook.com/"+<?php echo $user_id; ?>+"/picture?type = small">   ..[x]

user_id是php变量,我在这里接收代码:

<?php
    $user_id = $_POST['userid'];
?>

像[x]中的错误是什么?它没有显示图像

1 个答案:

答案 0 :(得分:1)

好的。

<img src="https://graph.facebook.com/<?php echo $user_id; ?>/picture?type = small">

作品