Facebook internal bug incorrectly replaces years in links with FB user ids #368

Closed
kylewm opened this Issue Feb 25, 2015 · 20 comments

Comments

Projects
None yet
3 participants
@kylewm
Collaborator

kylewm commented Feb 25, 2015

For example backfeeding a like on the post https://www.facebook.com/12802152/posts/10101222294987969 has

<a class="u-like u-like-of" href="https://kylewm.com/10101859667632951/02/can-t-believe-i-ve-never-seen-this-before-carl-sagan"></a>

whereas the correct URL should be https://kylewm.com/2015/02/can-t-believe-i-ve-never-seen-this-before-carl-sagan

somehow a random FB ID is sneaking into my permalink??

@snarfed

This comment has been minimized.

Show comment
Hide comment
@snarfed

snarfed Feb 25, 2015

Owner

holy what the I don't even... wow. that's a weird symptom. no clue what's going on, but nice catch!

Owner

snarfed commented Feb 25, 2015

holy what the I don't even... wow. that's a weird symptom. no clue what's going on, but nice catch!

@kylewm

This comment has been minimized.

Show comment
Hide comment
@kylewm

kylewm Feb 25, 2015

Collaborator

no way, it comes from the FB API like this. have to admit that's kind of funny.

/v2.2/12802152_10101222294987969

{
  "id": "12802152_10101222294987969",
  "from": {
    "id": "12802152",
    "name": "Kyle Mahan"
  },
  "message": "Can’t believe I’ve never seen this before Carl Sagan - Who Speaks for Earth. Hard to believe it’s from 35 years ago https://www.youtube.com/watch?v=HjrmK8t6VYk",
  "actions": [
    {
      "name": "Comment",
      "link": "https://www.facebook.com/12802152/posts/10101222294987969"
    },
    {
      "name": "Like",
      "link": "https://www.facebook.com/12802152/posts/10101222294987969"
    },
    {
      "name": "See Original",
      "link": "https://kylewm.com/10101343067483791/02/can-t-believe-i-ve-never-seen-this-before-carl-sagan"
    }
  ], 
Collaborator

kylewm commented Feb 25, 2015

no way, it comes from the FB API like this. have to admit that's kind of funny.

/v2.2/12802152_10101222294987969

{
  "id": "12802152_10101222294987969",
  "from": {
    "id": "12802152",
    "name": "Kyle Mahan"
  },
  "message": "Can’t believe I’ve never seen this before Carl Sagan - Who Speaks for Earth. Hard to believe it’s from 35 years ago https://www.youtube.com/watch?v=HjrmK8t6VYk",
  "actions": [
    {
      "name": "Comment",
      "link": "https://www.facebook.com/12802152/posts/10101222294987969"
    },
    {
      "name": "Like",
      "link": "https://www.facebook.com/12802152/posts/10101222294987969"
    },
    {
      "name": "See Original",
      "link": "https://kylewm.com/10101343067483791/02/can-t-believe-i-ve-never-seen-this-before-carl-sagan"
    }
  ], 
@kylewm

This comment has been minimized.

Show comment
Hide comment
@kylewm

kylewm Feb 25, 2015

Collaborator

Oh hilarious, 10101343067483791 is the app-scoped user id for facebook.com/2015

So I guess they are running a horrible regex that replaces /number with /app-scoped-number for any URL. These custom actions are anything but official (see my warning on http://indiewebcamp.com/POSSE_to_Facebook#See_Original), so I'm not terribly surprised that they broke support for URLs that aren't at facebook.com.

Collaborator

kylewm commented Feb 25, 2015

Oh hilarious, 10101343067483791 is the app-scoped user id for facebook.com/2015

So I guess they are running a horrible regex that replaces /number with /app-scoped-number for any URL. These custom actions are anything but official (see my warning on http://indiewebcamp.com/POSSE_to_Facebook#See_Original), so I'm not terribly surprised that they broke support for URLs that aren't at facebook.com.

@snarfed

This comment has been minimized.

Show comment
Hide comment
@snarfed

snarfed Feb 25, 2015

Owner

ahahaha everybody poops, even facebook. thanks for tracking it down.

Owner

snarfed commented Feb 25, 2015

ahahaha everybody poops, even facebook. thanks for tracking it down.

@snarfed snarfed closed this Feb 25, 2015

@snarfed

This comment has been minimized.

Show comment
Hide comment
@snarfed

snarfed Feb 27, 2015

Owner

oh btw @kylewm, if you can think of a workaround for this in bridgy or a-u, i say go for it.

Owner

snarfed commented Feb 27, 2015

oh btw @kylewm, if you can think of a workaround for this in bridgy or a-u, i say go for it.

@kylewm

This comment has been minimized.

Show comment
Hide comment
@kylewm

kylewm Feb 27, 2015

Collaborator

I mean, we could hard code the app-ids for 2010-2030 or something, but I don't really want to go there.

Collaborator

kylewm commented Feb 27, 2015

I mean, we could hard code the app-ids for 2010-2030 or something, but I don't really want to go there.

@kylewm

This comment has been minimized.

Show comment
Hide comment
@kylewm

kylewm Mar 1, 2015

Collaborator

@benwerd unfortunately, this may be relevant to your interests... see for example the "See Original" link on your post https://developers.facebook.com/tools/explorer/145634995501895/?method=GET&path=36802236_10101087679224279&version=v2.2&

{
  "id": "36802236_10101087679224279",
  "from": {
    "id": "36802236",
    "name": "Ben Werdmüller"
  },
  "message": "I can't find one: is there a UK equivalent to TaskRabbit that serves Oxford?",
  "actions": [
    {
      "name": "Comment",
      "link": "https://www.facebook.com/36802236/posts/10101087679224279"
    },
    {
      "name": "Like",
      "link": "https://www.facebook.com/36802236/posts/10101087679224279"
    },
    {
      "name": "See Original",
      "link": "http://werd.io/10101343067483791/i-cant-find-one-is-there-a-uk-equivalent-to"
    }
  ], 
Collaborator

kylewm commented Mar 1, 2015

@benwerd unfortunately, this may be relevant to your interests... see for example the "See Original" link on your post https://developers.facebook.com/tools/explorer/145634995501895/?method=GET&path=36802236_10101087679224279&version=v2.2&

{
  "id": "36802236_10101087679224279",
  "from": {
    "id": "36802236",
    "name": "Ben Werdmüller"
  },
  "message": "I can't find one: is there a UK equivalent to TaskRabbit that serves Oxford?",
  "actions": [
    {
      "name": "Comment",
      "link": "https://www.facebook.com/36802236/posts/10101087679224279"
    },
    {
      "name": "Like",
      "link": "https://www.facebook.com/36802236/posts/10101087679224279"
    },
    {
      "name": "See Original",
      "link": "http://werd.io/10101343067483791/i-cant-find-one-is-there-a-uk-equivalent-to"
    }
  ], 
@snarfed

This comment has been minimized.

Show comment
Hide comment
@snarfed

snarfed Mar 1, 2015

Owner

hah, funny, known evidently ignores that first numeric path element, which works around the problem. ie these urls all find the post correctly:

Owner

snarfed commented Mar 1, 2015

hah, funny, known evidently ignores that first numeric path element, which works around the problem. ie these urls all find the post correctly:

@benwerd

This comment has been minimized.

Show comment
Hide comment
@benwerd

benwerd Mar 2, 2015

/me whistles nonchalantly

This is absolutely correct, but is not guaranteed to be true in the future. But, yay, Facebook handles numbers terribly too hands in the air

benwerd commented Mar 2, 2015

/me whistles nonchalantly

This is absolutely correct, but is not guaranteed to be true in the future. But, yay, Facebook handles numbers terribly too hands in the air

@snarfed

This comment has been minimized.

Show comment
Hide comment
@snarfed

snarfed Sep 1, 2015

Owner

looks like this is currently happening to @cleverdevil too. facebook is converting his original post URL https://cleverdevil.io/2015/laying-in-bed-with-the-entire-family-after-a-tough to https://cleverdevil.io/10101859667632951/laying-in-bed-with-the-entire-family-after-a-tough.

Owner

snarfed commented Sep 1, 2015

looks like this is currently happening to @cleverdevil too. facebook is converting his original post URL https://cleverdevil.io/2015/laying-in-bed-with-the-entire-family-after-a-tough to https://cleverdevil.io/10101859667632951/laying-in-bed-with-the-entire-family-after-a-tough.

@snarfed

This comment has been minimized.

Show comment
Hide comment
@snarfed

snarfed Sep 1, 2015

Owner

this is a facebook bug, so it's a bit hard for us to work around. i'm reopening and updating the title so that we can at least find this easier.

Owner

snarfed commented Sep 1, 2015

this is a facebook bug, so it's a bit hard for us to work around. i'm reopening and updating the title so that we can at least find this easier.

@snarfed snarfed reopened this Sep 1, 2015

@snarfed snarfed removed the now label Sep 1, 2015

@snarfed snarfed changed the title from Weird u-like-of urls in Facebook like permalinks to Facebook internal bug incorrectly replaces years in links with FB user ids Sep 1, 2015

@kylewm

This comment has been minimized.

Show comment
Hide comment
@kylewm

kylewm Sep 1, 2015

Collaborator

We should assume FB's "See Original" support is going away since it is undocumented and was recently removed from their UI. We still get it from the API as metadata, but I suspect that is just an oversight on FB's part, and they'll stop sending it eventually/unexpectedly.

Unfortunately, since posse-post-discovery is very hard for Facebook posts (#375), this means that publishers will need to start including their original post URL some other way, maybe in the body of the post.

BTW, photos posted directly from Instagram app to Facebook have the post permalink in the header, instead of the typical application URL. The highlighted link below points to https://instagram.com/p/7FTl7KRR0K/ instead of instagram.com

instagram-permalink

Somebody should look into whether our sites (Known, Bridgy Publish, Red Wind) can use this same mechanism to replace See Original!

Collaborator

kylewm commented Sep 1, 2015

We should assume FB's "See Original" support is going away since it is undocumented and was recently removed from their UI. We still get it from the API as metadata, but I suspect that is just an oversight on FB's part, and they'll stop sending it eventually/unexpectedly.

Unfortunately, since posse-post-discovery is very hard for Facebook posts (#375), this means that publishers will need to start including their original post URL some other way, maybe in the body of the post.

BTW, photos posted directly from Instagram app to Facebook have the post permalink in the header, instead of the typical application URL. The highlighted link below points to https://instagram.com/p/7FTl7KRR0K/ instead of instagram.com

instagram-permalink

Somebody should look into whether our sites (Known, Bridgy Publish, Red Wind) can use this same mechanism to replace See Original!

@kylewm

This comment has been minimized.

Show comment
Hide comment
@kylewm

kylewm Dec 8, 2015

Collaborator

Somebody should look into whether our sites (Known, Bridgy Publish, Red Wind) can use this same mechanism to replace See Original!

"This is a custom configuration for Instagram"

Collaborator

kylewm commented Dec 8, 2015

Somebody should look into whether our sites (Known, Bridgy Publish, Red Wind) can use this same mechanism to replace See Original!

"This is a custom configuration for Instagram"

@snarfed

This comment has been minimized.

Show comment
Hide comment
@snarfed

snarfed Feb 11, 2016

Owner

@cleverdevil is hitting this again: http://indiewebcamp.com/irc/2016-02-11#t1455231072609

we should see if we can find a workaround.

Owner

snarfed commented Feb 11, 2016

@cleverdevil is hitting this again: http://indiewebcamp.com/irc/2016-02-11#t1455231072609

we should see if we can find a workaround.

@snarfed

This comment has been minimized.

Show comment
Hide comment
@snarfed

snarfed Feb 11, 2016

Owner

i think i'd reiterate @kylewm's point in #368 (comment) that the root cause here, FB's See Original link, is brittle and not really officially supported. @kylewm @benwerd (@cleverdevil) et al, if Known currently uses it for FB POSSE, maybe consider switching to an attached link or even text link instead? those are both known to work ok right now.

example FB API object below. compare the top-level link field, which is correct, and the See Original link, which is broken.

{
  "id": "10101418101899349_10101615455740669",
  "message": "Changing Education Paradigms",
  "link": "https://cleverdevil.io/2016/changing-education-paradigms",
  "actions": [{
    "name": "See Original",
    "link": "https://cleverdevil.io/10102571892817971/changing-education-paradigms"
  }],
  "application": {
    "category": "Utilities",
    "link": "http://cleverdevil.io/",
    "name": "cleverdevil known bridge",
    "id": "1021349254572205"
  },
  "caption": "cleverdevil.io",
  "description": "This year, my daughter made the move from preschool to school, and the transition was quite difficult for her. We initially enrolled her in a",
  "from": {
    "name": "Jonathan LaCour",
    "id": "10101418101899349"
  },
  "type": "link",
  "status_type": "published_story",
}
Owner

snarfed commented Feb 11, 2016

i think i'd reiterate @kylewm's point in #368 (comment) that the root cause here, FB's See Original link, is brittle and not really officially supported. @kylewm @benwerd (@cleverdevil) et al, if Known currently uses it for FB POSSE, maybe consider switching to an attached link or even text link instead? those are both known to work ok right now.

example FB API object below. compare the top-level link field, which is correct, and the See Original link, which is broken.

{
  "id": "10101418101899349_10101615455740669",
  "message": "Changing Education Paradigms",
  "link": "https://cleverdevil.io/2016/changing-education-paradigms",
  "actions": [{
    "name": "See Original",
    "link": "https://cleverdevil.io/10102571892817971/changing-education-paradigms"
  }],
  "application": {
    "category": "Utilities",
    "link": "http://cleverdevil.io/",
    "name": "cleverdevil known bridge",
    "id": "1021349254572205"
  },
  "caption": "cleverdevil.io",
  "description": "This year, my daughter made the move from preschool to school, and the transition was quite difficult for her. We initially enrolled her in a",
  "from": {
    "name": "Jonathan LaCour",
    "id": "10101418101899349"
  },
  "type": "link",
  "status_type": "published_story",
}

@snarfed snarfed added the now label Feb 11, 2016

@kylewm

This comment has been minimized.

Show comment
Hide comment
@kylewm

kylewm Feb 11, 2016

Collaborator

keep an eye on idno/Facebook#31

Collaborator

kylewm commented Feb 11, 2016

keep an eye on idno/Facebook#31

kylewm added a commit to kylewm/KnownFacebook that referenced this issue Feb 11, 2016

@kylewm kylewm referenced this issue in idno/Facebook Feb 11, 2016

Merged

remove See Original links #32

@snarfed

This comment has been minimized.

Show comment
Hide comment
@snarfed

snarfed Feb 12, 2016

Owner

woo thanks @kylewm! known plans to stop using See Original, which should mostly moot this. we should probably start walking back bridgy's support for it too, and document its problems in the bridgy docs.

Owner

snarfed commented Feb 12, 2016

woo thanks @kylewm! known plans to stop using See Original, which should mostly moot this. we should probably start walking back bridgy's support for it too, and document its problems in the bridgy docs.

kylewm added a commit to kylewm/KnownFacebook that referenced this issue Feb 24, 2016

@snarfed

This comment has been minimized.

Show comment
Hide comment
@snarfed

snarfed Feb 26, 2016

Owner

thanks for merging that known fix @kylewm! tentatively closing this.

Owner

snarfed commented Feb 26, 2016

thanks for merging that known fix @kylewm! tentatively closing this.

@snarfed snarfed closed this Feb 26, 2016

@benwerd

This comment has been minimized.

Show comment
Hide comment
@benwerd

benwerd Feb 26, 2016

A note here: there's an issue with Convoy / withknown.com wrt the latest syndication code, so it's taking me longer than I'd like to deploy that. Hoping to get it sorted by Monday.

benwerd commented Feb 26, 2016

A note here: there's an issue with Convoy / withknown.com wrt the latest syndication code, so it's taking me longer than I'd like to deploy that. Hoping to get it sorted by Monday.

@snarfed

This comment has been minimized.

Show comment
Hide comment
@snarfed

snarfed Feb 26, 2016

Owner

no worries @benwerd! not urgent.

Owner

snarfed commented Feb 26, 2016

no worries @benwerd! not urgent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment