Facebook Application Notifier in Newsfeed

2019-08-30 02:35发布

问题:

Does anyone know how these kind of functionality can be implemented?

  1. How can we get PlayNow kind of link ( I want to add my own custom link at that place)

  2. How to get user images on this kind of aggregation.

回答1:

As far as I can tell, this is a custom implementation from Facebook that you cannot control. Facebook provides custom aggregation on the newsfeed for certain popular actions, such as playing games, reading news or watching videos. As you can see in the aggregation you have posted, each app is different.

When a certain set of users read news using your app, and Facebook chooses to display an aggregation of "X and y more friends recently read articles" on those users' friends' news feeds, your app might come in that aggregation. The "read now" button comes on its own, since Facebook understands what your object is.

The aggregations you can control are those that consist of only your app, and you can do that in the Open Graph panel for your app on the Developer site. Just go into aggregations and design it to your choice. This is how I implemented it for myself:

This is how it would look like in a user's Home Feed. The text, "Share your twocents about Dil Chahta hain..." can be set up according to your requirements.

Secondly, you can control the aggregation for your own app on a user's timeline. This is how my app's aggregation looks on a user's timeline. Do note that currently, only two aggregations are shown for a user, instead of 3 as is displayed in my image (which was taken prior to the approval stage).



回答2:

That is an aggregation that facebook is making for a specific type of applications: Games. You can set your app as a Game in the app settings, first tab (Basic) first section (Basic Info) in the Category field.

If you do that then facebook should include your "game" when they aggregate this feed story to friends. If you do that how ever then you can't change the text from "Play Now", as far as I'm aware.

Using the open graph you can define the obejcts which your app uses and the actions users do on them. Then you can control how the stories produced by your app are aggregated into the timeline of a user.

The official guide is pretty straight forward and have good examples that you can follow to understand how things work. If you have a more specific question regarding the open graph then ask away.