amp-access 是否与 amp-story 一起使用?对于 amp-story,amp-subscription 会取代 amp-access 吗?
Does amp-access work with amp-story? Will amp-subscription overtake amp-access for amp-story?
amp-story 可以与 amp-access(或 amp-subscription)一起使用吗?
这里是 amp-access 的示例代码
<script id="amp-access" type="application/json">
{
"authorization": "https://ampbyexample.com/components/amp-access/authorization?rid=READER_ID&url=CANONICAL_URL&ref=DOCUMENT_REFERRER&_=RANDOM",
"pingback": "https://ampbyexample.com/components/amp-access/authorization?rid=READER_ID&url=CANONICAL_URL&ref=DOCUMENT_REFERRER&_=RANDOM",
"login": {
"sign-in": "https://ampbyexample.com/components/amp-access/login?rid=READER_ID&url=CANONICAL_URL",
"sign-out": "https://ampbyexample.com/components/amp-access/logout"
},
"authorizationFallbackResponse": {
"error": true,
"access": false,
"subscriber": false
}
}
</script>
所需的设置
<script async custom-element="amp-analytics" src="https://cdn.ampproject.org/v0/amp-analytics-0.1.js"></script>
<script async custom-element="amp-access" src="https://cdn.ampproject.org/v0/amp-access-0.1.js"></script>
引用
目前正在开发对 amp-story 的付费专区支持。您可以在 this GitHub issue.
中跟踪其进度
amp-story 可以与 amp-access(或 amp-subscription)一起使用吗?
这里是 amp-access 的示例代码
<script id="amp-access" type="application/json">
{
"authorization": "https://ampbyexample.com/components/amp-access/authorization?rid=READER_ID&url=CANONICAL_URL&ref=DOCUMENT_REFERRER&_=RANDOM",
"pingback": "https://ampbyexample.com/components/amp-access/authorization?rid=READER_ID&url=CANONICAL_URL&ref=DOCUMENT_REFERRER&_=RANDOM",
"login": {
"sign-in": "https://ampbyexample.com/components/amp-access/login?rid=READER_ID&url=CANONICAL_URL",
"sign-out": "https://ampbyexample.com/components/amp-access/logout"
},
"authorizationFallbackResponse": {
"error": true,
"access": false,
"subscriber": false
}
}
</script>
所需的设置
<script async custom-element="amp-analytics" src="https://cdn.ampproject.org/v0/amp-analytics-0.1.js"></script>
<script async custom-element="amp-access" src="https://cdn.ampproject.org/v0/amp-access-0.1.js"></script>
引用
目前正在开发对 amp-story 的付费专区支持。您可以在 this GitHub issue.
中跟踪其进度