update database when a user shared a link to facebook

前端 未结 4 2243
既然无缘
既然无缘 2021-01-06 15:45

Is it possible to update database once a user shared a link in my website?

Such as,some points will be awarded to their account if they shared the link.

And

4条回答
  •  萌比男神i
    2021-01-06 16:16

    Yes, it is possible.

    Example Link:

    SHARE TO FACEBOOK

    Example code to proses

    if(isset($_GET['share']))
    {
        if(mysql_query("insert into table X() value()"))
        {
            //open window, you can use header('location:..') or meta redirect or another way, in this sample i'm using javascript window.open;
            echo '';
        }
    }
    

    To implementing facebook "Like" button, this link maybe can help you

提交回复
热议问题