mirror of
https://github.com/fergalmoran/dss.git
synced 2026-02-10 18:13:58 +00:00
Added fb play story
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user