Facebook份额计数不起作用-新的API?

时间:2019-04-25 20:54:11

标签: facebook facebook-graph-api

几天前,facebook停止在图表中显示共享计数信息。当前如何下载以显示在php页面中?

在进入此链接后,总会有关于股票数量的信息,当前没有:https://graph.facebook.com/https://demotywatory.pl/4922745/Dziecko-nie-wie-ze-to-rzezba-po-prostu-chce-pomoc

我想在我的网站上显示此信息。怎么做?请帮助

2 个答案:

答案 0 :(得分:1)

现在在class RenderMessages extends Component { shouldComponentUpdate = nextProps => this.props.serverError !== '' || nextProps.serverError !== '' || this.props.serverMessage !== '' || nextProps.serverMessage !== ''; componentDidUpdate = () => { const { serverError, serverMessage } = this.props; if (serverError || serverMessage) { const notification = serverError ? serverErrorMessage(serverError) : serverSuccessMessage(serverMessage); this.renderNotification(...notification); } }; renderNotification = ({ noteType, description }) => { notification[noteType]({ message: noteType === 'error' ? 'Error' : 'Update', description, icon: descriptionLayout(noteType), }); setTimeout(() => this.props.resetServerMessages(), 3000); }; render = () => null; } export default connect( state => ({ serverError: state.server.error, // retrieving the error from redux state serverMessage: state.server.message, }), { resetServerMessages }, )(RenderMessages); 对象节点的That file extension is not accepted!字段下提供此信息。

https://developers.facebook.com/docs/graph-api/reference/v3.2/url

engagement

https://developers.facebook.com/tools/explorer?method=GET&path=%3Fid%3Dhttps%3A%2F%2Fdemotywatory.pl%2F4922745%2FDziecko-nie-wie-ze-to-rzezba-po-prostu-chce-pomoc%26fields%3Dengagement&version=v3.2

答案 1 :(得分:0)

在Facebook的app_id和app_secret中,其工作方式如下所示。

https://graph.facebook.com/?id={URL}&fields=engagement&access_token={your-app_id}|{your-app_secret}

输出:

{
  "engagement": {
    "reaction_count": 5,
    "comment_count": 3,
    "share_count": 60,
    "comment_plugin_count": 0
  },
  "id": "https://www.testing.com"
}