Skip to content
This repository has been archived by the owner on May 29, 2020. It is now read-only.

Add OpenGraph headers #4

Open
Artoria2e5 opened this issue Feb 5, 2015 · 2 comments
Open

Add OpenGraph headers #4

Artoria2e5 opened this issue Feb 5, 2015 · 2 comments

Comments

@Artoria2e5
Copy link
Contributor

The Open Graph protocol enables developers to integrate their pages into the social graph. These pages gain the functionality of other graph objects including profile links and stream updates for connected users.

From Wikipedia, the free encyclopedia.
en.wikipedia.org/wiki/Facebook_Platform#Open_Graph_protocol

Open Graph can be also used by Sina Weibo.

Somehow like other <meta> tags, we should set the header to each article we post……

<!--Generate those automatically using PHP?
    Port detection can be removed in our case, and we can hard-encode SERVER_NAME.
    So it turns into 'https://portal.anthonos.org'.$_SERVER['REQUEST_URI'] -->
<meta property="og:url" content="<?='https://'.$_SERVER['SERVER_NAME'].$_SERVER['SERVER_PORT']!='443'?$_SERVER['SERVER_PORT']:''.$_SERVER['REQUEST_URI']?>"/>
<meta property="og:site_name" content="Anthon Open Source Community"/>
<!--And then RTFM. -->

I'm not sure if we can use Accept-Lang to tell users using different languages from each other. If so we can use the $lang array.

@MingcongBai
Copy link

Well if anyone would do this...

@Yexiaoxing
Copy link
Contributor

Check http://ogp.me/ for documents.

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

No branches or pull requests

3 participants