问题标签 [indieweb]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
2 回答
5333 浏览

facebook - Facebook Graph API: Find graph object from post URL

Given the URL of a public Facebook post, how can one find the post object in the FB Graph API? (secondarily, why are so many user feeds empty or nearly empty when accessed through the API?)

We would like to be able to comment on or like a post via the v2.x Graph API, given the post's URL. Doing so requires the post's object ID, which we can make some educated guesses about, but accessing the actual object through the API has proven unreliable (works for some posts but not others).

v2 of the API introduced app-scoped user IDs, and post IDs generally seem to be of the form {app-scoped user id}_{unique post id}. Here are the details of some attempts to find posts in the API with various combinations of these IDs (global user id, app-scoped user id, and post id).

OK let's try the other direction. We'll page through the user's feed until we find the post in question. It feels like this is more the expected use case for the API...

For reference, here is the GitHub issue where we have been tracking this problem.

0 投票
0 回答
551 浏览

facebook - 通过 Facebook API 发布:如何像 Instagram 那样包含原始链接?

通常,当应用程序通过 Graph API 发布到 Facebook 时,Facebook 在新闻项目的顶部包含一个小链接,指示哪个应用程序发布了它,链接到应用程序的网站。

我最近注意到,当 Instagram 向 Facebook 分享照片时,项目顶部的“Instagram”链接指向实际的照片永久链接instagram.com/p/whatever,而不仅仅是instagram.com.

通过 Graph API 发布时,是否可以为每个帖子设置自定义 URL?还是其他机制?或者这只是 IG 的特殊内部配置?

Instagram 照片分享到 FB

0 投票
1 回答
24 浏览

openid - URL(不是域)是否适合 OpenID 2.0 身份?

我之前在indieweb 用例的上下文中使用过 OpenID 2.0 身份和委托 [1] ,其中假设每个用户控制一个域。所以一个身份看起来像https://example.com

OpenID 2.0 身份可以采用 URL 的形式,而不仅仅是一个域吗?例如,两者都https://example.com/alicehttps://example.com/bob是:

  1. 有效、独立的身份
  2. 每个人都可以委托给一个单独的身份提供者吗

[1]不是OpenID Connect,不支持委托

0 投票
1 回答
94 浏览

jekyll - 将 Jekyll 帖子数据与来自 YAML 的数据相结合以创建新的博客提要

我想我什至不确定我应该寻找什么。在我的Jekyll 博客上,我目前只有一些博客文章,这些文章已经写好并在主页上列出了它们的全部内容并使用了分页。我想遵循更多独立网络标准并遵循PESOS(在其他地方发布,联合(到您的)自己的站点)方法。我想出了一种方法来自动从我的 Twitter 获取数据(例如 post_date、嵌入代码等)到 YAML 数据文件中。我想要做的是从我的帖子中获取数据并结合来自 Twitter 的数据并将这些帖子包括在内,就好像它们也是博客帖子一样(计划也对 Instagram 做同样的事情)。

我已经尝试了很多东西,但我什至不确定这样做的最佳方法是什么。我假设它将使用类似于Using Jekyll 的东西,如何使用 for 循环更改数组的内容?,但我似乎无法让它工作。我的博客文章代码目前如下: