Integrating other social networks

From diaspora* project wiki
Revision as of 16:34, 10 December 2014 by Anahuac (talk | contribs) (→‎Wordpress)

General

Keys will be entered into your config/diaspora.yml

Twitter

  • Go to https://apps.twitter.com and sign in
  • Click on ‘Create an app’
    Create an app on Twitter
  • Register your app
    Register your app
    • Give it a name. For example "Diaspora at example.org"
    • Give it a description
    • Set the application website to your pod URL or a page that describes what Diaspora is and what your pod has to do with it
    • Important: Set the callback URL to https://your_pod/auth/twitter/callback, replacing your_pod of course.
    • There’s a ToS to accept
    • There is a Captcha ;)
    • Click “Create Twitter application”
  • Click the “Permissions” tab and change the “Access” to “Read and Write”.
  • Click the “Keys and Access Tokens” tab. You now can see your “Consumer Key” and your “Consumer Secret”, copy them to the right places in config/diaspora.yml
  • Restart Diaspora on your sever
    (You can skip that if you plan to also add support for more services. Just remember to do it once you're finished with all of them.)
  • You’re done. It’s now possible to post to Twitter from your pod :)

Tumblr

  • Goto Tumblr Apps page
  • You’ll be redirected to the Application Overview where you can see your "OAuth Consumer Key". Click on “Show secret key” to reveal your Secret Key.
  • Copy your OAuth Consumer Key and your Secret Key App to your config/diaspora.yml
  • Restart Diaspora on your server
  • You’re done. It’s now possible to post to Tumblr from your pod :)

Facebook

  • Goto Facebook Developers page and click "Add a New App"
  • Choose the "Website" option
  • Type a name for your App (eg. “Diaspora at social.example.org”) and click "Create New Facebook App ID"
  • Choose a category (eg. Communication) and click "Confirm"
  • Fill in the "Site URL" and "Mobile Site" URLs. You can use the same URL for both (eg. https://social.example.org) and click "Next"
  • Your App has now been created.
  • Return to the Facebook Developers home page and click the "Apps" dropdown menu and select your new App
  • The App ID is visible by default but the App Secret is hidden. Click on "Show" and re-enter your password to reveal the App Secret
  • Copy your App ID and your App Secret to your config/diaspora.yml
  • Click "Settings"
  • Add your pod domain (eg. https://social.example.org) to "App Domains" and add your email to the "Contact Email" then click "Save Changes"
  • Click "Status & Review"
  • In the "Do you want to make this app and all its live features available to the general public?" section, press the button to be "Yes"
  • Restart Diaspora on your server
  • You’re done. It’s now possible to post to Facebook from your pod

Application for Posting on FaceBook

From API 2.X you are required to apply your app for FaceBook before being able to post from Diaspora*. Requirements:

  • Big Logo, (1024x1024 px)
  • Small Logo, (250x250 px)
  • Developer Contact Email,
  • Link to privacy policy, (https://[yourpod][dot][tld]/terms)
  • Detailed description with pictures and a Test account for FaceBook.

Tip: When filling in the application, provide at least 4 screenshots that are larger then 350 px tall and wide. And make the application clear and simple as possible like it is being explained to a 5 years old which will greatly give you the chance succeed. If your application does not succeed the first time they will provide additional information submit again.

Additional notes: API 1.X will be removed on 25th December and you will be forcefully required to upgrade your API and submit an application.

Privacy of posts to Facebook

Any posts a user makes from a pod to Facebook will be made with the privacy level that the users sets on Facebook side when the user authorizes the diaspora* pod application. Posts done from diaspora* do not follow the privacy of selected aspects on diaspora* side. This behaviour is consistent with posting to Twitter etc where the target application governs the privacy of the post.

Wordpress

  • Go to the Wordpress.com Developer Site and click "Create New Application"
  • Add a name, a description (like "This application allows to post from the diaspora* social network to wordpress.com or any wordpress blog with jetpack enabled.") and the URL of your pod (eg. https://social.example.org)
  • Important: Set the “Redirect URL” to your pod url (including http/https)+ /auth/wordpress/callback So if your pod is located at https://social.example.org enter https://social.example.org/auth/wordpress/callback
  • Answer the Captcha
  • Choose the type "web"
  • Click on "Create"
  • Visit the MyApps page and select your new App
  • Copy your Client ID and your Client Secret to your config/diaspora.yml
  • Restart Diaspora on your server
  • You’re done. It’s now possible to post to Wordpress from your pod


Troubleshooting

When thing goes wrong sometimes solution is very simple. Take a look on some issues we know.

Twitter and Tumblr

Server date and time

Authentication method for those use timestamp to be generated. If your server time and timezone are not set as expected, then the hash is done wrong and it doesn't work.