11 February 2012

Selective posting to Twitter and Facebook from Google+

I previously wrote two blog entries about posting Google+ messages to Facebook and Twitter:



If you follow the second approach which only works for public posts. You can limit what is posted to your Twitter feed using a text similar to a hashtag. All you have to do is to include the word Twitter in your Google+ post for messages to be posted to your Twitter. I will explain how this is done.

Go to your previously setup feed on http://feedburner.google.com and change the settings on your feed to look like the screen shot below:




As you can see there are two differences between the settings in the above screen and the settings applies in the previous tutorial.

1. As the red arrow in the above image indicates you must enter the text Twitter or a unique text that you will add to your Google+ messages that you want to be posted to your Twitter account. Also note the drop down menu below the arrow should have the following option selected: "the title". Once these settings are saved the job is finished and you're read to go.

2. The second difference only applies for selective posting to Facebook. If you have followed my earlier tutorial but decide that not all your posts from Twitter should go to your Facebook wall remove the #fb that we had previously placed in the "additional text" text box. So now, if you want your Google+ posts that are submitted to Twitter to be also posted on Facebook you should include the word #fb in your Google+ post. Assuming you're currently using the "Selective Tweets" app on Facebook.

So now to automatically post something from Google+ to Twitter include the text Twitter and if you want to post it to Facebook as well as Twitter include the text: Twitter #fb

Note 1: This approach will only let you post to Facebook if you're posting it to Twitter as well.
Note 2: Since we are now including the #fb text in our Google+ post it must be towards the beginning of the message so that Twitter does not cut it off due to its limited message size.
Note 3: Since the #fb text is no longer appended to the end of our message you must go to facebook and change the setting in your "Selective Twitter" app on Facebook. Tick the checkbox which reads "Allow the #fb tag anywhere in the tweet?" as shown on the screen shot below:



I admit my solutions are always cumbersome and super geeky but they do work. If you have any questions don't hesitate to ask me on Google+, or Facebook, or Twitter. Also please subscribe to my blog via email or RSS feed

14 December 2011

How to get Twitter RSS Feed (Since Twitter started hiding it)

After Twitter changed its user interface from its simple initial design it also decided to hide the public RSS feed which was available on all profiles. Although the RSS feed is no longer visible, the functionality is still fully working.

The URL for an RSS feed looks like this:

http://twitter.com/statuses/user_timeline/101086296.rss

or alternatively with the atom extension:

http://twitter.com/statuses/user_timeline/101086296.atom

The problem that remains is finding the number which corresponds to a Twitter username. You can find out this number by using the Twitter API however there is a website that does this for you. Visit the website below and enter a Twitter username then click "Get ID" and you will be presented with the identification number of that particular Twitter user.

http://www.idfromuser.com/

So all you have to do now is replace that number into this URL (101086296 is my Twitter id):

http://twitter.com/statuses/user_timeline/101086296.atom

and you will have an RSS/Atom feed for any Twitter account.

If you'd like to be updated on new blog posts please subscribe to my RSS feed and/or via email.  I'm also on Twitter @JensonTaylorFacebook and Google+.



21 July 2011

Automatically publish your Google+ Plus "Public" posts to Twitter (and Facebook)

How to post your Public Google Plus posts to Twitter (and Facebook)

This technique will only work for *Public* posts.
  1. Copy this URL but replace the ending number with your own Google Plus account number http://plusfeed.appspot.com/106166623138751182431
  2. Go to http://feedburner.google.com and sign in with your Google account.
  3. Paste the above URL in the area which says "Burn a feed right this instant." Here is a screenshot: 
  4. Click "Next" and you will see this screen:
  5. On the above screen click "Next" which will take you to the below screen:
  6. Click "Next" on the above screen and you will be presented with the following screen:
  7. Click "Next" on the above page, which will take you to this screen:
  8. On the above page click the "Publicize" tab
  9. Then click the "Socialize" link from the left hand side links
  10. Click the button which says "Add a Twitter account". Assuming you are logged in on Twitter confirm the authorization page presented by Twitter.
  11. On the "Socialize" adjust your settings as shown on the screen shot below:
  12. Click the "Activate" button at the bottom of the page. From now on all your "Public" messages on Google plus will be posted to Twitter. The message that is posted on twitter will include the beggining of your post with a link to your message on your Google+ profile. So hopefully your Twitter followers will gradually migrate to Google Plus. Note, there will be a delay from your messages being posted on Google Plus to them appearing on Twitter.
  13. To reduce the delay between posting something on Google Plus and it appearing on Twitter click on "PingShot" link on the left hand side, which will take you to the below page:
  14. Then click "Activate" to enable this feature, (above screen shot)
The automatic Twitter posting is now complete and ready to go, and all tweets will include a link to your message posted on Google Plus.

For those of you who want these messages to automatically post to Facebook as well, there are many options available to synchronize the two. I will mention two methods:

Method 1: If you're looking to automatically post all your Twitter updates straight to Facebook, the Twitter application (by Twitter) is the best option. It's really simple to use; just install the application and then click to allow Twitter to update your Facebook status.

Method 2: However I prefer that only some of my tweets to be automatically posted to my Facebook wall so I use an applications called Selective Tweet Status. This application will only post tweets that end in #fb to your Facebook profile. Once you go to this application's page, enter your Twitter username and click save. So for our automatic tweets that are generated from Google+ we need to add the three characters #fb to the end of our tweets. To do this:
  1. Go to http://feedburner.google.com
  2. Click on the appropriate link for your Google+ link. e.g.
  3. Click on the "Publicize" tab
  4. Click on "Socialize" from the left hand side links
  5. Enter #fb in the "Additional text" section. like the screen shot below:
  6. Make sure the drop down menu below it is set to "end of the post"
  7. Click the "Save" button at the bottom of the page.
  8. Enjoy! (Usually your updates will appear on Facebook within 2 minutes of them being posted on Twitter, however sometimes when Twitter is having difficulties (fail whale..) it can take quite a bit longer.)
Problems:
If your tweets do not appear on your Facebook status it could be because your tweets are set to private or due to spamming type behaviour Twitter has stopped your tweets from appearing in search. The selective tweets application uses Twitter search mechanism to locate the tweets that are destined for Facebook. For more info see http://apps.facebook.com/selectivetwitter/help


Recommendation:
The major "Plus" of this method is that posts made on Google+ are automatically posted to both Facebook and Twitter with a link back to your Google+ post. So Google+ remains your main communication head quarters while Twitter and Facebook just act as mediums for letting people who are not yet on Google+ what's happening. So the people on Facebook and Twitter will get the information but with a delay. You can read the instruction on link below to get your Google+ posts to instantly post to Facebook, however messages longer than 47 characters will be chopped and there will be no link back to your Google+ post on Facebook. 
http://jensontaylor.blogspot.com/2011/07/automatically-publish-your-google-plus.html

I have enabled both approaches on my profile, i.e. the nice but delayed approach described here as well as the instant but limited approach described in the above link. So my Facebook page shows each message twice. Once it displays a chopped message and then after a delay a more complete message is posted. The way I view Google+ is my updates' center. The fact that my posts are spammed shared on other social networks is just a bonus. If people reply to my posts on other social networks I will receive their messages on my mobile phone so I will still interact with users from other social networks but the interaction will be more one way in the sense that I respond to people who have interacted with me explicitly as opposed to me commenting on their photos or wall posts or reacting to someone's tweets, because I will not spend much time on those networks, now that Google+ does a better job for my needs.

Personally I don't like the approaches that I have suggested at all because it relies on too many unreliable services and the slow updates, however so far it has worked perfectly for me. Google has indicated that they will provide xml/rss feed for Google+ so once that feature is available we can cut out the third party website. I will update you on this as soon as it becomes available.

P.S. Don't forget to subscribe to this blog via email or feed

20 July 2011

Automatically publish your Google+ Plus posts to Facebook

Updating your Facebook status via Google Plus+

  1. Access Facebook
  2. Go to http://facebook.com/mobile
  3. Copy your email address unique (underneath where it says "Upload via Email")
  4. Go to the circle's page on Google+ and create a circle called "Facebook Status"
  5. Add the e-mail from Facebook in your new circle(Facebook Status)
  6. When you want to publish something on Facebook, simply add the circle.(and don't forget to tick the checkbox which says "Also email 1 person not yet using Google+ yet")
  • Photos are not uploaded on Facebook
  • Works with public posts as well (As long as you include the "Facebook Status" circle)
  • Your posts on Facebook will take the default permission("Everyone" or "Friends of Friends" or "Friends Only")
  • UPDATE: If the message is longer than 47 characters you will see the first 44 characters followed by three dots in your Facebook status. (I have informed Google+ of this problem and I hope they will solve it)

22 June 2011

Firebird/Interbase SQL Add/Update/Alter Column/Field Type and Default Value

Note: Using double quotes for a string(varchar) fails! (not sure if this has anything to do with the utility I use to connect to the DB or the Firebird database itself.
ALTER TABLE my_table_name ADD my_column_name Varchar(30) default 'Not Processed' NOT NULL;



----

Changing the length of the email field varchar to 45 (In the users table).

ALTER TABLE users ALTER COLUMN email_address TYPE VarChar(45);


19 October 2010

Install Apache 2.2 with mod_proxy module for Tomcat 7.0.2

Installing/building Mod Proxy for integration of Apache with Tomcat
Install mod_proxy from apache source
Installing everything from source as usual results in leaner installation so that's the way I prefer to go on production servers. Also, the stop/start and restart time gives us less down time when not including dynamic shared object modules. So no dynamic modules is a plus even though it's less flexible and has a steeper learning curve.

To enable mod_proxy with necessary modules run the command below:

./configure --prefix=/usr/local/apache2.0 \
--enable-proxy \
--enable-proxy-connect \
--enable-proxy-http

Note: the backslash lets you spread out a single command over more than one lines, which improves readability. So after the backslash once you press return the command will not be executed.

If you need to access files using ftp then add --enable-proxy-ftp to you list of modules when executing the above command.


Dynamic vs. Static

./configure --enable-proxy=static will build mod_proxy linked statically into the resulting httpd executable; this is the default if you specify ./configure --enable-proxy. ./configure --enable-proxy=shared is necessary to build the module as a loadable shared library.

Similarly, ./configure --enable-modules=proxy will link mod_proxy statically into the executable, while ./configure --enable-mods-shared=proxy will cause it to be built as a shared library. See the Apache configure documentation for more details.


Apache configure/installation/build from source Help

run the command ./configure --help to get the below output of the options available for configuring apache before building and installing it.

`configure' configures this package to adapt to many kinds of systems.

Usage: ./configure [OPTION]... [VAR=VALUE]...

To assign environment variables (e.g., CC, CFLAGS...), specify them as
VAR=VALUE.  See below for descriptions of some of the useful variables.

Defaults for the options are specified in brackets.

Configuration:
  -h, --help              display this help and exit
      --help=short        display options specific to this package
      --help=recursive    display the short help of all the included packages
  -V, --version           display version information and exit
  -q, --quiet, --silent   do not print `checking...' messages
      --cache-file=FILE   cache test results in FILE [disabled]
  -C, --config-cache      alias for `--cache-file=config.cache'
  -n, --no-create         do not create output files
      --srcdir=DIR        find the sources in DIR [configure dir or `..']

Installation directories:
  --prefix=PREFIX         install architecture-independent files in PREFIX
                          [/usr/local/apache2]
  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
                          [PREFIX]

By default, `make install' will install all the files in
`/usr/local/apache2/bin', `/usr/local/apache2/lib' etc.  You can specify
an installation prefix other than `/usr/local/apache2' using `--prefix',
for instance `--prefix=$HOME'.

For better control, use the options below.

Fine tuning of the installation directories:
  --bindir=DIR            user executables [EPREFIX/bin]
  --sbindir=DIR           system admin executables [EPREFIX/sbin]
  --libexecdir=DIR        program executables [EPREFIX/libexec]
  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
  --libdir=DIR            object code libraries [EPREFIX/lib]
  --includedir=DIR        C header files [PREFIX/include]
  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
  --infodir=DIR           info documentation [DATAROOTDIR/info]
  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
  --mandir=DIR            man documentation [DATAROOTDIR/man]
  --docdir=DIR            documentation root [DATAROOTDIR/doc/PACKAGE]
  --htmldir=DIR           html documentation [DOCDIR]
  --dvidir=DIR            dvi documentation [DOCDIR]
  --pdfdir=DIR            pdf documentation [DOCDIR]
  --psdir=DIR             ps documentation [DOCDIR]

System types:
  --build=BUILD     configure for building on BUILD [guessed]
  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
  --target=TARGET   configure for building compilers for TARGET [HOST]

Optional Features:
  --disable-option-checking  ignore unrecognized --enable/--with options
  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  --enable-layout=LAYOUT
  --enable-v4-mapped      Allow IPv6 sockets to handle IPv4 connections
  --enable-exception-hook Enable fatal exception hook
  --enable-maintainer-mode
                          Turn on debugging and compile time warnings
  --enable-pie            Build httpd as a Position Independent Executable
  --enable-modules=MODULE-LIST
                          Space-separated list of modules to enable | "all" |
                          "most"
  --enable-mods-shared=MODULE-LIST
                          Space-separated list of shared modules to enable |
                          "all" | "most"
  --disable-authn-file    file-based authentication control
  --enable-authn-dbm      DBM-based authentication control
  --enable-authn-anon     anonymous user authentication control
  --enable-authn-dbd      SQL-based authentication control
  --disable-authn-default authentication backstopper
  --enable-authn-alias    auth provider alias
  --disable-authz-host    host-based authorization control
  --disable-authz-groupfile
                          'require group' authorization control
  --disable-authz-user    'require user' authorization control
  --enable-authz-dbm      DBM-based authorization control
  --enable-authz-owner    'require file-owner' authorization control
  --enable-authnz-ldap    LDAP based authentication
  --disable-authz-default authorization control backstopper
  --disable-auth-basic    basic authentication
  --enable-auth-digest    RFC2617 Digest authentication
  --enable-isapi          isapi extension support
  --enable-file-cache     File cache
  --enable-cache          dynamic file caching
  --enable-disk-cache     disk caching module
  --enable-mem-cache      memory caching module
  --enable-dbd            Apache DBD Framework
  --enable-bucketeer      buckets manipulation filter
  --enable-dumpio         I/O dump filter
  --enable-echo           ECHO server
  --enable-example        example and demo module
  --enable-case-filter    example uppercase conversion filter
  --enable-case-filter-in example uppercase conversion input filter
  --enable-reqtimeout     Limit time waiting for request from client
  --enable-ext-filter     external filter module
  --disable-include       Server Side Includes
  --disable-filter        Smart Filtering
  --enable-substitute     response content rewrite-like filtering
  --disable-charset-lite  character set translation
  --enable-charset-lite   character set translation
  --enable-deflate        Deflate transfer encoding support
  --enable-ldap           LDAP caching and connection pooling services
  --disable-log-config    logging configuration
  --enable-log-forensic   forensic logging
  --enable-logio          input and output logging
  --disable-env           clearing/setting of ENV vars
  --enable-mime-magic     automagically determining MIME type
  --enable-cern-meta      CERN-type meta files
  --enable-expires        Expires header control
  --enable-headers        HTTP header control
  --enable-ident          RFC 1413 identity check
  --enable-usertrack      user-session tracking
  --enable-unique-id      per-request unique ids
  --disable-setenvif      basing ENV vars on headers
  --disable-version       determining httpd version in config files
  --enable-proxy          Apache proxy module
  --enable-proxy-connect  Apache proxy CONNECT module
  --enable-proxy-ftp      Apache proxy FTP module
  --enable-proxy-http     Apache proxy HTTP module
  --enable-proxy-scgi     Apache proxy SCGI module
  --enable-proxy-ajp      Apache proxy AJP module
  --enable-proxy-balancer Apache proxy BALANCER module
  --enable-ssl            SSL/TLS support (mod_ssl)
  --enable-distcache      Select distcache support in mod_ssl
  --enable-optional-hook-export
                          example optional hook exporter
  --enable-optional-hook-import
                          example optional hook importer
  --enable-optional-fn-import
                          example optional function importer
  --enable-optional-fn-export
                          example optional function exporter
  --enable-static-support Build a statically linked version of the support
                          binaries
  --enable-static-htpasswd
                          Build a statically linked version of htpasswd
  --enable-static-htdigest
                          Build a statically linked version of htdigest
  --enable-static-rotatelogs
                          Build a statically linked version of rotatelogs
  --enable-static-logresolve
                          Build a statically linked version of logresolve
  --enable-static-htdbm   Build a statically linked version of htdbm
  --enable-static-ab      Build a statically linked version of ab
  --enable-static-checkgid
                          Build a statically linked version of checkgid
  --enable-static-htcacheclean
                          Build a statically linked version of htcacheclean
  --enable-static-httxt2dbm
                          Build a statically linked version of httxt2dbm
  --enable-http           HTTP protocol handling
  --disable-mime          mapping of file-extension to MIME
  --enable-dav            WebDAV protocol handling
  --disable-status        process/thread monitoring
  --disable-autoindex     directory listing
  --disable-asis          as-is filetypes
  --enable-info           server information
  --enable-suexec         set uid and gid for spawned processes
  --disable-cgid          CGI scripts
  --enable-cgi            CGI scripts
  --disable-cgi           CGI scripts
  --enable-cgid           CGI scripts
  --enable-dav-fs         DAV provider for the filesystem
  --enable-dav-lock       DAV provider for generic locking
  --enable-vhost-alias    mass virtual hosting module
  --disable-negotiation   content negotiation
  --disable-dir           directory request handling
  --enable-imagemap       server-side imagemaps
  --disable-actions       Action triggering on requests
  --enable-speling        correct common URL misspellings
  --disable-userdir       mapping of requests to user-specific directories
  --disable-alias         mapping of requests to different filesystem parts
  --enable-rewrite        rule based URL manipulation
  --enable-so             DSO capability

Optional Packages:
  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  --with-included-apr     Use bundled copies of APR/APR-Util
  --with-apr=PATH         prefix for installed APR or the full path to
                             apr-config
  --with-apr-util=PATH    prefix for installed APU or the full path to
                             apu-config
  --with-pcre=PATH        Use external PCRE library
  --with-port=PORT        Port on which to listen (default is 80)
  --with-sslport=SSLPORT  Port on which to securelisten (default is 443)
  --with-z=DIR            use a specific zlib library
  --with-sslc=DIR         RSA SSL-C SSL/TLS toolkit
  --with-ssl=DIR          OpenSSL SSL/TLS toolkit
  --with-mpm=MPM          Choose the process model for Apache to use.
                          MPM={beos|event|worker|prefork|mpmt_os2}
  --with-module=module-type:module-file
                          Enable module-file in the modules/
                          directory.
  --with-program-name     alternate executable name
  --with-suexec-bin       Path to suexec binary
  --with-suexec-caller    User allowed to call SuExec
  --with-suexec-userdir   User subdirectory
  --with-suexec-docroot   SuExec root directory
  --with-suexec-uidmin    Minimal allowed UID
  --with-suexec-gidmin    Minimal allowed GID
  --with-suexec-logfile   Set the logfile
  --with-suexec-safepath  Set the safepath
  --with-suexec-umask     umask for suexec'd process

Some influential environment variables:
  CC          C compiler command
  CFLAGS      C compiler flags
  LDFLAGS     linker flags, e.g. -L if you have libraries in a
              nonstandard directory 
  LIBS        libraries to pass to the linker, e.g. -l
  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I if
              you have headers in a nonstandard directory 
  CPP         C preprocessor

Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.

28 September 2010

Manual Apache HTTPd 2.2 installation on Ubuntu Linux

1. get sources
wget http://mirror.ox.ac.uk/sites/rsync.apache.org//httpd/httpd-2.2.16.tar.gz

2. extract sources
tar xzfv httpd-2.2.16.tar.gz 

3. Configure various aspects of apache (you can choose where apache shall be installed and run from. These paths will be written and compiled into the binaries so this step is important).
more on this at: 

I don't want to change the default configurations so I just run:
./configure

4. To build apache:
make

5. To install(copy the files to the right places)
sudo make install

since I didn't configure the installation path, the default value (/usr/local/apache2) was used to install apache in.

6. Start the Apache server program

To test the server, first I go to the correct directory:
cd /usr/local/apache2/bin


then run the following command:
sudo ./apachectl -k start

7. Associate Apache webserver with a domain name
I get the following error:
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName

The reason for this error is that a domain name is not associated with this web server so to overcome this problem, I need to edit httpd.conf:
vi /user/local/apache2/conf/httpd.conf

change the line 
#ServerName www.example.com:80

To something like (assuming you own the domain radep.com and it points at this machine):
ServerName radep.com:80

8. Restart server
then restart the server(assuming you are in /user/local/apache2/bin):
sudo ./apachectl -k restart

9. Test it from your browser
Now you can use your browser to visit radep.com
lynx radep.com

you should see the text "It works!" which is the text that is contained in the file /usr/local/apache2/htdocs/index.html

If you need to go deeper into this process check out:

or just ask me.