Bug 1113176 - [Loop] Shared link isn't shown in "Shared link" list 

See bug https://bugzilla.mozilla.org/show_bug.cgi?id=1113176 please. Action happens at https://github.com/jaoo/firefoxos-loop-client/tree/1113176.
Move these lines to a separate function, and call it when onsuccess/onerror after calling an activity.