Skip to content
This repository has been archived by the owner on Mar 12, 2023. It is now read-only.

Twitterカードのブックマークが上手く表示されていない #114

Closed
nuovotaka opened this issue Aug 18, 2022 · 2 comments
Closed
Assignees

Comments

@nuovotaka
Copy link

不具合の概要

Twitter ブックマークが画像付きで表示されない。
仕様でしょうか?

期待しているのは下記のような画像付きのブックマークです。
スクリーンショット 2022-08-18 11 43 04

再現方法

easy-notion-blog.nuovotaka.com
の 
https://easy-notion-blog.nuovotaka.com/blog/twitter-card

エラーログ

Functions の内容

[GET] /_next/data/j1dAM7xsus_wvqTtJ4HOY/blog/sick-egpa-part35.json
11:24:25:15

[GET] /_next/data/j1dAM7xsus_wvqTtJ4HOY/blog/smartphonepoach2-leathercraft.json
11:24:24:68

[GET] /_next/data/j1dAM7xsus_wvqTtJ4HOY/blog/tag/blog.json
11:24:24:58

[GET] /_next/data/j1dAM7xsus_wvqTtJ4HOY/blog.json
11:24:24:58

[GET] /api/url-metadata?url=https://twitter.com/nuovotaka/status/1559998318939439108?s=21&t=rwsON9JfEczxmXI7z1F5eA
11:24:24:34
start: 1660789464533,
socket: 1660789464533,
lookup: 1660789464533,
connect: 1660789464591,
secureConnect: 1660789464607,
upload: 1660789464608,
response: 1660789464628,
end: 1660789464629,
error: undefined,
abort: undefined,
phases: {
wait: 0,
dns: 0,
tcp: 58,
tls: 16,
request: 1,
firstByte: 20,
download: 1,
total: 96
}
},
options: {
request: undefined,
agent: { http: undefined, https: undefined, http2: undefined },
h2session: undefined,
decompress: true,
timeout: {
connect: undefined,
lookup: undefined,
read: undefined,
request: undefined,
response: undefined,
secureConnect: undefined,
send: undefined,
socket: undefined
},
prefixUrl: '',
body: undefined,
form: undefined,
json: undefined,
cookieJar: undefined,
ignoreInvalidCookies: false,
searchParams: undefined,
dnsLookup: undefined,
dnsCache: undefined,
context: {},
hooks: {
init: [],
beforeRequest: [],
beforeError: [],
beforeRedirect: [],
beforeRetry: [],
afterResponse: []
},
followRedirect: true,
maxRedirects: 10,
cache: undefined,
throwHttpErrors: true,
username: '',
password: '',
http2: false,
allowGetBody: false,
headers: {
'user-agent': 'got (https://github.com/sindresorhus/got)',
'accept-encoding': 'gzip, deflate, br'
},
methodRewriting: false,
dnsLookupIpVersion: undefined,
parseJson: [Function: parse],
stringifyJson: [Function: stringify],
retry: {
limit: 2,
methods: [ 'GET', 'PUT', 'HEAD', 'DELETE', 'OPTIONS', 'TRACE' ],
statusCodes: [
408, 413, 429, 500,
502, 503, 504, 521,
522, 524
],
errorCodes: [
'ETIMEDOUT',
'ECONNRESET',
'EADDRINUSE',
'ECONNREFUSED',
'EPIPE',
'ENOTFOUND',
'ENETUNREACH',
'EAI_AGAIN'
],
maxRetryAfter: undefined,
calculateDelay: [Function: calculateDelay],
backoffLimit: Infinity,
noise: 100
},
localAddress: undefined,
method: 'GET',
createConnection: undefined,
cacheOptions: {
shared: undefined,
cacheHeuristic: undefined,
immutableMinTimeToLive: undefined,
ignoreCargoCult: undefined
},
https: {
alpnProtocols: undefined,
rejectUnauthorized: undefined,
checkServerIdentity: undefined,
certificateAuthority: undefined,
key: undefined,
certificate: undefined,
passphrase: undefined,
pfx: undefined,
ciphers: undefined,
honorCipherOrder: undefined,
minVersion: undefined,
maxVersion: undefined,
signatureAlgorithms: undefined,
tlsSessionLifetime: undefined,
dhparam: undefined,
ecdhCurve: undefined,
certificateRevocationLists: undefined
},
encoding: undefined,
resolveBodyOnly: false,
isStream: false,
responseType: 'text',
url: URL {
href: 'https://twitter.com/nuovotaka/status/1559998318939439108?s=21',
origin: 'https://twitter.com',
protocol: 'https:',
username: '',
password: '',
host: 'twitter.com',
hostname: 'twitter.com',
port: '',
pathname: '/nuovotaka/status/1559998318939439108',
search: '?s=21',
searchParams: URLSearchParams { 's' => '21' },
hash: ''
},
pagination: {
transform: [Function: transform],
paginate: [Function: paginate],
filter: [Function: filter],
shouldContinue: [Function: shouldContinue],
countLimit: Infinity,
backoff: 0,
requestLimit: 10000,
stackAllItems: false
},
setHost: true,
maxHeaderSize: undefined,
signal: undefined,
enableUnixSockets: true
}
}

期待する挙動

Notionでtwitterを埋め込んだモノの下にブックマークがあります。そのブックも表示させたい。
twitter ブックマークの表示(今回は画像付き)

スクリーンショット

・Notionのスクショ
スクリーンショット 2022-08-18 11 16 02

スクリーンショット 2022-08-18 11 16 29

スクリーンショット 2022-08-18 11 16 50

・エラーが発生している画面のスクリーンショットを添付します。
スクリーンショット 2022-08-18 11 13 41

リポジトリとブランチ名

もし Fork した easy-notion-blog でエラーが発生している場合には、あなたのリポジトリの URL とブランチ名を記載します。
https://github.com/nuovotaka/easy-notion-blog
main ブランチ #111

デスクトップ環境

追加情報

他に伝えておくべき追加情報があれば記述します。

@otoyo
Copy link
Owner

otoyo commented Aug 18, 2022

Twitter を表示したい場合にはブックマークではなく Embed Tweet を選択していただければ下記のようなカードが表示されます。

スクリーンショット 2022-08-18 13 04 57

Twitter の URL を Notion に貼り付けた際にメニューが出るので Embed Tweet を選択してください。

スクリーンショット 2022-08-18 13 03 13

ツイートのURLをブックマークした際に情報が表示されないのは、ツイートURLには一般的なサイト情報を表すメタ情報がないためとなります。
対応は可能ですが、他のユーザーからも需要があれば対応したいと思います。
基本的には easy-notion-blog は自分で必要なものは自分でカスタマイズしていただくというスタンスです。

@otoyo otoyo self-assigned this Aug 18, 2022
@nuovotaka
Copy link
Author

了解しました。
TwitterはEmbed Tweetを選択するようにします。
有難う御座いました。

@otoyo otoyo closed this as completed Aug 18, 2022
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

2 participants