Retired Documentation: You are using the documentation for version 1.7.3 which was retired in 2013. Go here for the latest version documentation or check here for your available upgrades to ExpressionEngine 3.
Blogger API Module
The Blogger API (Application Programming Interface) is an interface or "protocol" that will allow other programs to interact with the backend of your publishing system remotely. In practical terms, this would allow you to post an entry to a Blogger API-compatible site from an external program.
ExpressionEngine supports the Blogger API, but it is important to understand that the Blogger API was originally written for the Blogger service, where there were no comments, no trackbacks, only one entry field, and regularly no title added. Thus, it is very limited by its own nature in what it can do.
- The Control Panel
- Connecting with a Blogger API Compatible Program
- Writing in a Blogger API Compatible Program
The Blogger API Control Panel is accessed via Modules > Blogger API in your Control Panel. Here, you can set up configurations for use with the Blogger API.
The main page lists all existing configurations, along with the URL used for connecting to that configuration with your Blogger API compatible program.
The configuration settings are primarily used when an entry is sent from ExpressionEngine to the Blogger API compatible program. The following settings are available for each configuration.
The name for your configuration, which is listed in the main table.
Default Field for Entry Data
This is the default entry field to use for entries posted via the Blogger API. If no field is specified for a new entry, or if an edited entry is being sent as block text with individual fields not specified, then this is the entry field into which the entry's content is inserted. Make sure to choose a field that is available for the weblog to which you are posting.
Send Entries as Block
If this is set to "Yes", then EE will combine all of your custom field data into a single chunk of text before sending it to the desktop program.
Text Formatting Preference
With this preference set to "Yes", ExpressionEngine will render out all pMcode and file directories contained within your entries before sending the content to your program.
Note: This preference must be set to "Yes" if you wish to make use of either of the following two options.
Send Pre-formatted Text to Desktop Client
This setting determines whether EE will render your content according to the field "formatting" choice (i.e. xhtml, none, etc.) before sending it to your program. Typically, this is set to "No".
You can determine how HTML within your entries is treated when it is sent to your program. The following options are available:
- Allow ALL HTML: This leaves the HTML code as written.
- Allow only safe HTML: This will allow "safe" HTML (<b>, <i>, <u>, <em>, <strike>, <strong>, <pre>, <code>, <blockquote>, <h2>, <h3>, <h4>, <h5>, <h6>) to be kept when the content is sent to your program. All other HTML is converted to character entities and the raw code will be sent to the program.
- Convert HTML into character entities: This will convert the HTML tags to character entities and the raw code will be sent to the program.
In general, you will use the URL provided on the Blogger API main screen for your configuration to connect with your Blogger API compatible program. Below is information specific to some common programs.
To connect with Ecto, you will need the URL provided for your configuration as well as your member login information.
Using this information, Ecto will contact the API server to determine if that user is valid and what weblogs they are permitted to access. It then contacts the API Server and downloads recent entries for all of those weblogs. Ecto does not provide a method for specifying a particular weblog, thus you will receive all weblogs for which your user has access.
To connect with MarsEdit, you will need the URL provided for your configuration, your member login information, and a weblog ID. You may actually use the "Weblog ID" value to specify a number of things to restrict which entries MarsEdit will retrieve for you.
The Weblog ID value may specify weblogs, categories, and statuses for your entries. This information is separated by colons and multiple values of each may be specified by the pipe ("|") character. For instance, the following values could be used for the Weblog ID:
1 - Basic weblog id
1|3 - Multiple weblog ids
1:5|8|9 - weblog id with categories specified
1:5|8|9:open - weblog id : categories : status
If you post a new entry with the program's Weblog ID having these settings, the new entry will go into the first weblog id specified (if you have multiple weblogs). Further, it will be assigned to all of the categories specified.
There are two general approaches used by the editor programs.
Many of the posting programs use a WYSIWYG (What You See Is What You Get) editor similar to Dreamweaver. If this is the case, then you will likely have your configuration (see the Control Panel section) set to send and receive your entries as a large block of text without fields specified.
In these cases, you will just write your entry, give it a title, and when it is posted the Blogger API Server in ExpressionEngine will post it to the Default Field set in the configuration.
Some programs also offer an HTML or text editor allowing you to have greater control over what is sent as content. In this case, you have a great deal of flexibility in how an entry is posted by specifying certain details in the entry. You can use the following "tags" in your content to specify things when ExpressionEngine processes the entry.
You may assign the entry to specific categories. You may use either the Category ID or the actual name for the category, separating multiple categories by the pipe ("|") character.
You may specify how content is placed in different fields.
<custom_field_name>This is summary text.</custom_field_name>
<another_field>This is body text.</another_field>
NOTE: Some field short names will not work, specifically those that are identical to certain HTML tags that are filtered for security reasons, i.e. <body>, <script>, etc.
You may specify if the entry should be "sticky".
You may specify the title for the entry. Some programs (such as MarsEdit) require this to be specified.
<title>Posting is Fun!</title>
If you have multiple weblogs in your Weblog ID (above), you can specify the particular weblog_id to use instead of simply using the first one by default.