简体   繁体   English

PHP在页面墙上发布

[英]PHP posting on page wall

I have a website where users can post jobs for free. 我有一个网站,用户可以免费发布职位。 How can I link these posts to a facebook page about this website? 如何将这些帖子链接到有关该网站的Facebook页面? I don't want the users to login to fb. 我不希望用户登录到fb。 At this moment I post them to twitter and then using selective tweets to post them on my page. 此时,我将它们发布到Twitter,然后使用选择性推文将它们发布到我的页面上。 But selective tweets is not able to post logo's specific for that job. 但是选择性推文无法发布该工作的徽标。

I created a fb app. 我创建了一个fb应用程序。 Did not select anything just gave it a name and got an appID and appSecret. 没有选择任何东西,只是给它起了一个名字,并得到了一个appID和appSecret。 I dont now what to select in "Select how your app integrates with Facebook". 我现在不在“选择您的应用程序如何与Facebook集成”中选择什么。 Becouse it is not a mobile app and it is not a website with fb login. 因为它不是移动应用,也不是具有fb登录的网站。

Kind regards. 亲切的问候。

you can use share on facebook facility of facebook ,from http://developer.facebook.com . 您可以从http://developer.facebook.com在facebook的facebook工具上使用share。 you can easily add this to your website. 您可以轻松地将此添加到您的网站。 have fun! 玩得开心!

You can do this easily via MYSQL and PHP, depending on how your current site is setup. 您可以通过MYSQL和PHP轻松完成此操作,具体取决于当前站点的设置方式。 What i would do is store the jobs into a separate table while saving, like this 我要做的是在保存的同时将作业存储到单独的表中,就像这样

(table) Facebook (表格)Facebook
pageid //numerical value pageid //数值
header //job title 标头//职位
message //job description 消息//职位描述

So that you can use it for the next part. 这样您就可以在下一部分中使用它了。

Create an application via Facebook and give it authentication to users and your Facebook page. 通过Facebook创建一个应用程序,并向用户和您的Facebook页面进行身份验证。 by adding this application to your page you can then call something like : 通过将此应用程序添加到您的页面,您可以调用类似以下内容的代码:

$facebook->set_user($user, $session_key); $ facebook-> set_user($ user,$ session_key);

$facebook->api_client->stream_publish($item['header'], $item['message'], $item['pageid']); $ facebook-> api_client-> stream_publish($ item ['header'],$ item ['message'],$ item ['pageid']);

Using your keys from facebook. 从Facebook使用你的钥匙。

Then you can run a Cron that updates every x minutes, and after it has posted it, in an array, you can clear the table for the next row of jobs. 然后,您可以运行一个Cron,该Cron每隔x分钟更新一次,并将其发布到阵列中后,您可以清除表格以查找下一行作业。

Let me know where you are on this and ill try to help as much as possible. 让我知道您的情况,请尽量避免提供帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM