[英]Navigate in timeline to a specific year/month AND post (facebookID) with a single url
I noticed that with a URL of the format 我注意到网址格式如下
facebook.com/ username /timeline/2013/4
facebook.com/ 用户名 / timeline / 2013/4
we move to the end of the specified month of the year. 我们将移至一年中指定月份的末尾。
Now I need to use an url to navigate a user in my timeline to a specific post (facebookID) in a way that he can still move up and down on timeline from this point of time (anchor). 现在,我需要使用一个URL将用户在我的时间轴中导航到特定帖子(facebookID),使他仍然可以从该时间点(锚点)在时间轴上上下移动。
Any clues? 有什么线索吗?
On a Facebook page, each post's HTML element has its own unique HTML id
. 在Facebook页面上,每个帖子的HTML元素都有其自己的唯一HTML
id
。 You can make use of this fact to directly link to a post within a page on Facebook by identifying the post's id
and using it as the fragment identifier in the URL. 您可以利用此事实,通过标识帖子的
id
并将其用作URL中的片段标识符 ,直接链接到Facebook页面上的帖子。
To find a post's HTML element id
, right click the particular post in your browser [I'm assuming Chrome], then click "inspect element". 要查找帖子的HTML元素
id
,请在浏览器中右键单击特定的帖子(假设使用Chrome),然后单击“检查元素”。 In the opened development environment, find an enclosing div
of the inspected element which contains an id
HTML attribute. 在打开的开发环境中,找到被检查元素的包含
div
,其中包含id
HTML属性。
For example, a link to a particular post on Disney's March 2013 Facebook timeline is the following: 例如,指向迪士尼2013年3月Facebook时间轴上特定帖子的链接如下:
https://www.facebook.com/Disney/timeline/2013/02/#tl_unit_6154529015953642023 https://www.facebook.com/Disney/timeline/2013/02/#tl_unit_6154529015953642023
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.