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

Facebook cross-posting should contain link to Diaspora Post #7770

Closed
HankG opened this issue Apr 7, 2018 · 6 comments
Closed

Facebook cross-posting should contain link to Diaspora Post #7770

HankG opened this issue Apr 7, 2018 · 6 comments

Comments

@HankG
Copy link
Contributor

HankG commented Apr 7, 2018

I'm experimenting with the Facebook cross-posting capability and it is working pretty well. When cross-posting a picture it posts a link to the picture in Diaspora. I think it would be good for it to post the link to the original Diaspora post in general, or at least make that something a sure can toggle. For posts with links I was thinking it should embed it near the end in a way that does not limit Facebook's rendering system from rendering the requested end link. So it would be something like this:

<message> (<diaspora link>) <original link URL>

I've experimented with this manually and it renders well in Facebook.

I have looked at the code from the service and think I see how I'd make the change. I'd be willing to pick this up as a first change if this behavior is something that is agreed upon.

@HankG
Copy link
Contributor Author

HankG commented Apr 8, 2018

I have an initial implementation. The behavior I am seeking is the following:

  • If the post is a photo or just text, have the D* link posted at the end like
  • If the post ends in a validly formed URL then we want the URL to stay at the end so it is rendered by Facebook correctly but we want to append a (via D* link) so that there is a trace back to the original D* post

So a post which reads "Some text." would post to Facebook as:
"Some text. http://<diasporaserver>/p/<postnumber>"

Whereas a post which reads ""Some text and a link http://someserver1/testlink1 http://someserver2/testlink2"" would post to Facebook as:
"Some text and a link http://someserver1/testlink1 (via http://<diasporaserver>/p/<postnumber> ) http://someserver2/testlink2"

I have amended the spec to exercise this new functionality so there are appropriate tests for happy path and some errant condition testing. I don't have a means for Facebook integration testing. If this concept sounds good I'd be up for working with a seasoned developer on next steps towards the pull request.

@SuperTux88
Copy link
Member

Whereas a post which reads ""Some text and a link http://someserver1/testlink1 http://someserver2/testlink2"" would post to Facebook as:
"Some text and a link http://someserver1/testlink1 (via http://<diasporaserver>/p/<postnumber> ) http://someserver2/testlink2"

That looks very weird, why should the "via" be inserted in the middle of the post? Why not a (via http://<diasporaserver>/p/<postnumber>) always at the end of the post?

@HankG
Copy link
Contributor Author

HankG commented Apr 8, 2018

I believe if you put it at the end then Facebook will not render any of the URLs but I can experiment with it manually. If it works then always putting it at the end makes sense to me.

@HankG
Copy link
Contributor Author

HankG commented Apr 8, 2018

...I actually tested and it does render correctly. I can make it so it has the via at the end if there is a URL otherwise just straight posting the link. So:

"Some text. http://<diasporaserver>/p/<postnumber>"
and:
"Some text and a link http://someserver1/testlink1 http://someserver2/testlink2 (via http://<diasporaserver>/p/<postnumber> ) "

@SuperTux88
Copy link
Member

I would always add it with "via".

@HankG
Copy link
Contributor Author

HankG commented Apr 8, 2018

OK. I have follow-up questions for whomever from the seasoned development team wants to help me.

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

No branches or pull requests

2 participants