Sunday 15 June 2014

Week 4 : Override

I dedicated week 4 to build a system such that irrespective of the nodetype considered socialConnect should support it just by small additions to the .yaml file,and larger changes can be tailormade by writing a sub-class which extends the pre-existing override methods.

Progress:
  1. On Communicating with my mentors I was convinced that a checkbox system for the inspector is more suited and is more functional,Hence I changed the code to support checkbox in the inspector and property type was set to boolean.
  2. Instead of having a class(FacebookHelper class) which gets the values of the Facebook post parameters directly,I opted for an indirectly approach where in a base Override class(FbOverride.php) exists which is a default override class for Facebook.
  3. I have added NodeType specific classes for Headline and Page which extend FbOverride but add features of their own,this inclusion required me to write a Factory class(FacebookFactory.php) to generate the right object for a NodeType.
  4. Suppose a new page is created(Download section for neos demo site)and it is shared via socialConnect.The override class(FbPageOverride.php) automatically finds the page name,page link and the headline/text nodetypes and assigns it accordingly to the facebook post parameters as shown.

    here headline becomes the content of the post,the page title becomes the Link title for the post,the text element becomes the description and the caption is queried from the settings.yaml.
  5. Another challenge was providing the link to the page ,now any node published the link to the page will be found and will be conveyed to the facebook post.
Issues:
  1. For now the above features don't tend to work seamless on all pages and cases,some debugging is required .
  2. handling images to facebook post is tricky from a local server . 
Next week goals:
  1. Debug and make fetching text/headline work seamlesslly for all cases and scenarios. 
  2. wind up on Facebook Connect.start Google Plus.
Catch this project on Github  or packagist

No comments:

Post a Comment