You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/manual/extensions/news-facebook-sync.en.md
+130-1
Original file line number
Diff line number
Diff line change
@@ -220,6 +220,8 @@ There is a button to trigger a sync in the back end, within the global operation
220
220
221
221
## Hooks
222
222
223
+
The extension provides some [Hooks][Hooks] which allow you to alter the behavior when posting to Facebook or fetching Facebook posts.
224
+
223
225
### `processFacebookPost`
224
226
225
227
The extension processes a Facebook post and tries to convert it to a fitting Contao news entry as best as it can. If you want to customize the final data for a news entry of a Facebook post, you can use the `processFacebookPost` hook. It expects an array containing the final news entry data as the return value. If the return value equals to false, no news entry will be created.
@@ -232,7 +234,8 @@ The extension processes a Facebook post and tries to convert it to a fitting Con
232
234
233
235
### `changeFacebookMessage`
234
236
235
-
When posting a Contao news entry as a Facebook post, the extension either uses the teaser or the specified message of the news entry. If you want to automatically provide a different message, you can use the `changeFacebookMessage` hook. It expects the final message as the return value.
237
+
When posting a Contao news entry as a Facebook post, the extension either uses the teaser or the specified message of the news entry. If you want to automatically provide a different message, you can use the `changeFacebookMessage` hook. It expects the final message as the return value.
238
+
236
239
237
240
#### Parameters
238
241
@@ -241,10 +244,136 @@ When posting a Contao news entry as a Facebook post, the extension either uses t
241
244
3._object_`$objArchive` The news archive object.
242
245
243
246
247
+
#### Example
248
+
249
+
The following example appends the news article's URL to any photo post:
0 commit comments