mirror of
https://github.com/fergalmoran/dss.git
synced 2026-03-25 15:05:51 +00:00
Fixed og:type
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
import abc
|
||||
from allauth.socialaccount.models import SocialAccount
|
||||
from allauth.socialaccount.models import SocialAccount, SocialToken
|
||||
from allauth.socialaccount.providers.facebook.provider import FacebookAccount
|
||||
|
||||
from django.db import models
|
||||
from model_utils.managers import InheritanceManager
|
||||
from open_facebook import OpenFacebook
|
||||
from core.utils.url import wrap_full
|
||||
|
||||
from spa.models.notification import Notification
|
||||
@@ -28,11 +30,16 @@ class Activity(_BaseModel):
|
||||
return "%s" % self.get_object_name()
|
||||
|
||||
def post_social(self):
|
||||
social_account = SocialAccount.objects.filter(user=self.user)[0]
|
||||
if social_account:
|
||||
provider = social_account.get_provider_account()
|
||||
print "Here"
|
||||
|
||||
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"
|
||||
"""
|
||||
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('1500x1500')
|
||||
image = mix.get_image_url('200x200')
|
||||
audio_url = mix.get_stream_path()
|
||||
mix_url = mix.get_absolute_url()
|
||||
default = _getPayload(request)
|
||||
|
||||
@@ -7,11 +7,7 @@
|
||||
<meta property="og:url" content="{{ mix_url }}/" />
|
||||
|
||||
<meta property="og:site_name" content="Deep South Sounds"/>
|
||||
<meta property="og:type" content="music.song" />
|
||||
{% comment %}
|
||||
<meta property="og:audio" content="{{ audio_url }}">
|
||||
<meta property="og:audio:type" content="audio/mpeg">
|
||||
{% endcomment %}
|
||||
<meta property="og:type" content="deepsouthsounds:mix" />
|
||||
<meta property="og:title" content="{{ title }}" />
|
||||
<meta property="og:description" content="{{ description }}" />
|
||||
<meta property="og:image" content="{{ image_url }}" />
|
||||
|
||||
Reference in New Issue
Block a user