Database Reference
In-Depth Information
params = {"u": username, "s": skip}
result = query.execute(**params)
for r in result:
setattr(r, "timestampAsStr",
datetime.fromtimestamp(int(r.timestamp)).strftime('%m/%d/%Y') + " at " +
datetime.fromtimestamp(int(r.timestamp)).strftime('%I:%M %p')
)
return result
Adding a Status Update
The page shown in Figure 9-10 shows the form to add a status update for the current user, which is displayed when
clicking on the “Add Content” link just under the “Graph Story—Social Feed” header. The HTML for the form can
be found in {PROJECTROOT}/app/public/templates/graphs/social/posts.html . The form uses the addContent
function in graphstory.js to POST a new status update as well as return the response and add it to the top of the
status update content stream.
Figure 9-10. Adding a status update
 
Search WWH ::




Custom Search