Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Likes comments etc. count for facebook #713

Closed
plotti opened this issue Jun 13, 2018 · 2 comments
Closed

Likes comments etc. count for facebook #713

plotti opened this issue Jun 13, 2018 · 2 comments
Assignees
Labels
Bridge-Feature-Request Request for a new bridge feature

Comments

@plotti
Copy link

plotti commented Jun 13, 2018

It would be awesome if you could extract the number of likes and comments counts. They are public after all so that might work well.

@logmanoriginal logmanoriginal added the Bridge-Feature-Request Request for a new bridge feature label Jun 15, 2018
@logmanoriginal
Copy link
Contributor

logmanoriginal commented Jun 24, 2018

Unfortunately this doesn't seem possible, as the data is not available in the HTML source. Here is what RSS-Bridge receives (using FacebookBridge):

<div>
	<form rel="async" class="commentable_item" method="post" data-ft="&#123;&quot;tn&quot;:&quot;]&quot;&#125;" action="/ajax/ufi/modify.php"
		onsubmit="return window.Event &amp;&amp; Event.__inlineSubmit &amp;&amp; Event.__inlineSubmit(this,event)" id="u_0_3q">
		<input type="hidden" name="lsd" value="AVrFFg2x" autocomplete="off" />
		<input type="hidden" autocomplete="off" name="ft_ent_identifier" value="1018733731627793" />
		<input type="hidden" autocomplete="off" name="data_only_response" value="1" />
		<div class="_sa_ _gsd _fgm _5vsi _192z">
			<div class="_37uu"></div>
		</div>
		<div class="uiUfi UFIContainer _3-a6 _4eno _1blz _5pc9 _5vsj _5v9k" id="u_0_3p"></div>
	</form>
</div>

As you can see the .UFIContainer is empty, where in my browser it contains the data you requested:

Click to see contents
<div class="UFIRow UFILikeSentence _4204">
	<div direction="right" class="clearfix">
		<div class="_ohf rfloat">
			<div class="_3scp">
				<div class="_6a">
					<div class="_3scs uiPopover _6a _6b">
						<a class="_p" href="#" role="button" aria-controls="js_1rs" id="js_1rt">Oldest
							<div class="_3sct"></div>
						</a>
					</div>
				</div>
			</div>
		</div>
		<div class="">
			<div class="UFILikeSentenceText">
				<span>
					<a data-hovercard="/ajax/hovercard/hovercard.php?id=120663997947278&amp;extragetparams=%7B%22source_feedback_owner_id%22%3A%22120663997947278%22%2C%22source_feedback_identifier%22%3A%222096228870390771%22%2C%22hc_location%22%3A%22ufi%22%7D"
					 class="profileLink" dir="ltr" href="https://www.facebook.com/mashody/?hc_location=ufi" id="js_1or" aria-describedby="js_1q7"
					 aria-owns="">Mashody</a>, De Schmid, Vani Çekrezi and 251 others like this.</span>
			</div>
		</div>
	</div>
</div>
<div class="UFIRow UFIShareRow">
	<a class="UFIShareLink" rel="dialog" data-hover="tooltip" ajaxify="/ajax/timeline/sign_up_dialog/?next=https%3A%2F%2Fwww.facebook.com%2Fpages_reaction_units%2Fmore%2F%3Fpage_id%3D120663997947278%26cursor%3D%257B%2522timeline_cursor%2522%253A%2522timeline_unit%253A1%253A00000000001525858685%253A04611686018427387904%253A09223372036854775801%253A04611686018427387904%2522%252C%2522timeline_section_cursor%2522%253A%257B%257D%252C%2522has_next_page%2522%253Atrue%257D%26surface%3Dwww_pages_home%26unit_count%3D8&amp;entity_id=120663997947278&amp;context=share"
	 href="https://www.facebook.com/shares/view?id=2096228870390771" id="js_1mp">7 Shares</a>
</div>
<h6 class="accessible_elem">Comments</h6>
<div class="_3b-9 _j6a">
	<div>
		<div id="comment_js_kw" class="UFIRow _48ph UFILastComment _48pi UFILastCommentComponent _2o9m UFIComment _4oep" role="article"
		 aria-label="Comment" data-ft="{&quot;tn&quot;:&quot;R&quot;}">
			<div class="_3b-9">
				<div>
					<div direction="left" class="clearfix">
						<div class="_ohe lfloat">
							<img alt="Jan Hofmann" class="img UFIActorImage _54ru img _8o _8s UFIImageBlockImage img" src="https://scontent.fhaj1-1.fna.fbcdn.net/v/t1.0-1/p32x32/15032916_1498578026838253_9103257853030442786_n.jpg?_nc_cat=0&amp;oh=5959d7f507d52f4217a2c2687d87397c&amp;oe=5BB89A89">
						</div>
						<div class="">
							<div class="UFIImageBlockContent _42ef">
								<div class="UFICommentContentBlock">
									<div class="UFICommentContent">
										<div class="_26f8">
											<div class="_10la">
												<span class=" UFICommentActorAndBody">
													<span class="">
														<span class=" UFICommentActorName" dir="ltr">Jan Hofmann</span>
													</span>
													<span>
														<span>
															<span data-ft="{&quot;tn&quot;:&quot;K&quot;}">
																<span class="UFICommentBody">
																	<span>Janet Free</span>
																</span>
															</span>
														</span>
													</span>
												</span>
												<div class="_10lo"></div>
											</div>
											<span class="_36rj">
												<a class="UFICommentCloseButton hdn _1-be _xw0 _xw9 _5upp _42ft" data-testid="ufi_comment_close_button" menutype="DOTS"
												 title="Manage" href="#">Manage</a>
											</span>
										</div>
										<span></span>
										<div></div>
									</div>
									<div class="fsm fwn fcg UFICommentActions">
										<span>
											<a class="uiLinkSubtle" href="/mashody/posts/2096228870390771?comment_id=2111452285535096&amp;comment_tracking=%7B%22tn%22%3A%22R%22%7D"
											 data-ft="{&quot;tn&quot;:&quot;N&quot;}" data-testid="ufi_comment_timestamp">
												<abbr class="UFISutroCommentTimestamp livetimestamp" title="Sunday, May 6, 2018 at 11:02 AM" data-utime="1525629733"
												 data-minimize="true" data-shorten="true">6w</abbr>
											</a>
										</span>
									</div>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>

Looks like Facebook does some lazy loading for the statistics and comments, which is very unfortunate. On the other hand, the FB2Bridge might have access to the contents, but it seems to be broken right now. At least on my machine.

@logmanoriginal logmanoriginal self-assigned this Jun 24, 2018
@dvikan dvikan closed this as completed Mar 26, 2022
@dvikan
Copy link
Contributor

dvikan commented Mar 27, 2022

#2047

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bridge-Feature-Request Request for a new bridge feature
Projects
None yet
Development

No branches or pull requests

3 participants