Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I post formatted Source Code on Facebook? [closed]

I want to create a page on the Facebook, where I want to post Code from different languages.

  1. Does Facebook provide any means of posting formatted code on the wall?
  2. Is there an API for doing so on Facebook?
like image 264
Master Avatar asked Sep 19 '13 18:09

Master


People also ask

Can you put code in a Facebook post?

To get the Facebook embed code from a post, simply: Choose the post you want to show. Click on the top right-hand corner options menu and choose “embed post” Copy and paste the code into your blog or website.

How do I use markdown on Facebook?

When you create a new post, click on the small </> icon to activate the Markdown feature. This feature is currently only available to Event administrators: let's keep our fingers crossed for this option to become available soon to Page administrators as well.

How do you post something on Facebook?

Tap in the top right of Facebook. Search for the Page you'd like to post on, then select it from the dropdown menu. Tap Posts, then tap Write something on the Page. Write your post, then tap Publish.


2 Answers

July 2019 update

You can do it in two ways, but only in group posts.

  • using markdown syntax (``` before and after the code snippet)
  • using 4 spaces before each line of code

IMPORTANT: it only works when you actually type out the backticks or spaces, it doesn't work when you copy and paste the entire post.

like image 151
asliwinski Avatar answered Oct 01 '22 09:10

asliwinski


Short answers to short, on-point questions:

(Jan 2018)

1. No

2. No

(Updated Jan 2022)

like image 24
DonJoe Avatar answered Oct 01 '22 10:10

DonJoe