Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Meta tags & og are not detectable by facebook share #40

Closed
MartiniHenry1988 opened this issue May 31, 2017 · 6 comments
Closed

Meta tags & og are not detectable by facebook share #40

MartiniHenry1988 opened this issue May 31, 2017 · 6 comments

Comments

@MartiniHenry1988
Copy link

MartiniHenry1988 commented May 31, 2017

I am using Angular 2 + Meteor 1.4 & I have successfully integrated this package and I can see the titles on my web pages.

But when I check my website url on Facebook Sharing Debugger i.e:

https://developers.facebook.com/tools/debug/sharing

It doesn't shows the page title or the image etc on facekook and it gives these errors:

Missing Required Property
The 'og:type' property is required, but not present.

Inferred Property
The 'og:url' property should be explicitly provided, even if a value can be inferred from other tags.

Share App ID Missing
The 'fb:app_id' property should be explicitly provided, Specify the app ID so that stories shared to Facebook will be properly attributed to the app. Alternatively, app_id can be set in url when open the share dialog.

Inferred Property
The 'og:image' property should be explicitly provided, even if a value can be inferred from other tags.

Why is this so?

@tombpain
Copy link

Are you using Angular Universal?

@MartiniHenry1988
Copy link
Author

I am using Angular 2

@tombpain
Copy link

tombpain commented Jun 6, 2017

Sure but you will need to use server side rendering to be able to use metadata on Facebook.

Angular is a client side application and as such Facebook's crawler can't see the metadata updates you are applying as they are carried out past the initial load of the page.

https://angular.io/docs/ts/latest/guide/universal.html

Hope that helps.

@MartiniHenry1988
Copy link
Author

@tombpain Do I have to migrate from Angular 2 to Angular Universal? Because I have a huge project running on Angular 2 with Meteor 1.5 now

@vkvish
Copy link

vkvish commented Aug 2, 2017

@tombpain how do i deploy an universal Angular project.
In the dist folder it creats two additional folders ngfactory and out-tsc. But i am not sure how do i deploy it on apache server.
Thanks

@vinaygopinath
Copy link
Owner

ng2-meta primarily aims to serve tags to Google's crawler, which renders your site with Javascript enabled, and can pick up the tags set by ng2-meta/Angular's own Meta service.

Facebook's crawler, like Twitter, Whatsapp and most other social media crawlers, does not execute Javascript. You need to use server-side rendering (in the form of Angular universal) and/or prerendering in combination with ng2-meta to provide your meta tags to these crawlers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants