Added fb play story

This commit is contained in:
Fergal Moran
2014-06-01 15:05:08 +01:00
parent 2e13a266c6
commit a816ae58ac
2 changed files with 13 additions and 11 deletions

View File

@@ -30,16 +30,18 @@ class Activity(_BaseModel):
return "%s" % self.get_object_name()
def post_social(self):
return
"""
social_account = SocialToken.objects.filter(account__user=self.user.user, account__provider='facebook')[0]
facebook = OpenFacebook(social_account.token)
notification_html = {
'mix': self.get_object_url()
}
result = facebook.set('me/deepsouthsounds:play?', message=notification_html)
print "Here"
"""
try:
social_account = SocialToken.objects.filter(account__user=self.user.user, account__provider='facebook')[0]
facebook = OpenFacebook(social_account.token)
notification_html = {
'mix': wrap_full(self.get_object_url())
}
result = facebook.set('me/deepsouthsounds:play', notification_html)
print result
except Exception, ex:
print ex.message
pass
def create_notification(self):
try:
notification = Notification()

View File

@@ -38,7 +38,7 @@ def mix(request, args):
except Mix.DoesNotExist:
raise Http404
image = mix.get_image_url('200x200')
image = mix.get_image_url('400x400')
audio_url = mix.get_stream_path()
mix_url = mix.get_absolute_url()
default = _getPayload(request)