-
Notifications
You must be signed in to change notification settings - Fork 127
Using Messenger on Desktop
Murhaf Sousli edited this page May 21, 2023
·
4 revisions
While the Messenger share button works without issues on Mobile, it won't work out of the box on desktop like the rest of the share buttons, FB requires setting special parameters in the sharer URL.
To make Messenger button work on desktop, you will need to set the appId
and the redirectUrl
.
You can either add the meta tag in your index.html
, for example:
<head>
<meta property="fb:app_id" content="YOUR_FB_APP_ID" />
</head>
Or using the global config:
@NgModule({
providers: [
{
provide: SHARE_BUTTONS_CONFIG,
useValue: {
appId: 'YOUR_FB_APP_ID',
redirectUrl: 'MESSENGER_REDIRECT_URL'
}
}
],
bootstrap: [AppComponent]
})
export class AppModule {
}
Can be set in the global config as shown in the previous example or via component input [redirectUrl]
:
<share-buttons [redirectUrl]="messengerRedirectUrl"></share-buttons>