jeffreywix/fb-cal-tpa — pull request #25 by jeffreywix (2014-08-07 16:45:54+00:00)
Title: Feature:  Connecting Modal with Facebook

**Main Point:**
**The modal is complete. All interactions with Facebook (liking, posting, commenting, rvsp-ing, unliking, deleting posts, sharing to FB) are working now.**

Server Changes:
- Fixed serious vulnerability where data returned from Facebook on server side contained long term access token of user and was sent to the client. Now this data is cleaned to remove the access token before sending to client
- Pulling more statuses and comments from the server now works
- Removed some print statements in server

Settings Changes:
- Added tooltip for commenting setting to explain that it controls user interaction
- Updated text in settings panel to better explain commenting - noted that user can still rsvp and share your event if commenting is turned off

Modal Updates:
- Like and comment buttons disappear now if Facebook does not give me links to like/comment on the post respectively
- Fixed problem where comments weren't being rendered as HTML
- Fixed problems with guest numbers not showing up
- Hosted by now links to the host's Facebook account
- Fixed another problem with guest numbers not rendering when values are equal to zero
- Added file for dealing with logging in site visitors and getting access tokens for fb event interaction
- Clicking buttons for more feed now calls appropriate functions in controller
- Started functions for handling Facebook interactions from the modal controller and for parsing fb urls
- Added functions for making interactions with Facebook (checking whether user is logged in and then making FB API call).
- Also set up functions for getting more replies and statuses from server
- Implemented structures that prevent visitors from seeing commenting, posting, and liking options if user turns off commenting in settings.
- Fixed serious vulnerability where data returned from facebook on server side contained long term access token of user and was sent to the client. Now this data is cleaned to remove the access token before sending to client
- Wrote up all functions that make call to FB API to allow for liking, posting, commenting, and changing rsvp status
- Force users to type something before they can post of comment (no empty posts/comments)
- Also set up different message for loading more statuses into feed
- Handling fb requests in the controller now works can calls the appropriate fb api functions in other files.
- Also separated comment and status processing functions into individual functions
- All Facebook interactions work now although user does not see any changes right now except for when posting.
- Fixed case where user tries to post a blank message
- Cleaned up function for handling Facebook interactions
- Fixed bug where commenting on status that was just posted does not work
- Comments added by a visitor now show up in the modal after they have been successfully published
- Likes on status are reflected in the modal now after successful response from Facebook
- Tried to fix problem where if you comment but did not show all replies yet and do so later, your comment will appear in the middle rather than after the shown replies. Tried to fix the problem by calling show more replies at least once automatically. This should solve the problem 9 out of 10 of the times, only failing in cases where a post exceeds about 25 comments
- Darker background on name is only added if there is a cover photo now
- Fixed problems with comments not showing up if the status previously had no comments. Also fixed problems with posts not looking as intended due to sanitizing which is not done any more before sending to facebook. Now, only incoming text is sanitized, not outgoing text (posts, comments)
- Increased the size of the hostedBy font
- Now if the user has granted rsvp_status permission through the app before, the modal will automatically get the user's rsvp status and display it in the modal
- Removed comment moderation setting
- Added loading message for overall modal and added loading message for loading event feed
- Changed message for loading guest stats to match other loading messages
- Shortened wait time before height adjustment of blocks to make them match height faster
- The effects of liking a comment are now seen in the modal (like count goes up) after a success message from Facebook
- Implemented unliking of posts and comments
- Also broke main function for dealing with Facebook interactions into two smaller functions
- Set up all error message modals
- Also getting the event link also works
- Sharing to Facebook now works
- Deletion of comments and posts made by the app is working now
- Sharing to FB is prevented if Facebook SDK is not loaded; setting equal height on the 4 small boxes is now based on outer height rather than inner height so things will still work if no border is used
- Added ng-Animate
- Adding/Removing statuses and comments are animated now
- Removed animation from adding more comments because it didn't look good - block didn't grow quickly enough