I am developing a game atm so far i have it so it comment but i really what it do it is post it on the target users wall instead if i am target a and i attack target b it would post a message on target b’s wall, not target a,
This is my php code i have atm,
$u=$F_user;
$message="".$u."has attacked your army on williamsgme take back your gold buy seeking revenge on hime";
echo takelife($F_user,$pid);
$facebook->api_client->stream_publish($message,$id);
if(!$facebook)
{
echo "Error";
}
else
{
echo "Comment Posted";
}
How can i achieve what i want $id is the user of the person i am attacking for my facebook game,
If you know how i can make the changes to the above to what i need any help would be good,
i should be able to post that message to the user id of the facebook user eg if i posted it to facebook user’s id of 1234567890 then it will display it on his wall of user id’s facebook id 1234567890 profile page.
I don’t understand the problem. You attack player b, and the message is posted on player b’s wall. To me it sounds very logical, but you don’t want that?
If you want to post the message to your (the attacker’s) wall, can’t you just put your id in $id?
It’s just that reading the OP, to me it isn’t clear what his code is doing right now, and what he wants it to do. Does it post the message on the target’s wall, or on the attacker’s wall. And where should it be posted. The one, the other, or both?
Of course, I have no idea how the FB API works, so I couldn’t help him anyway. But I thought asking for some more explanation might help others as well in understanding the problem. Unless, of course, I’m the only one that doesn’t understand