adding the ability to customize your open graph namespace
This commit is contained in:
parent
36ebefeaad
commit
64bf4a1f48
2 changed files with 9 additions and 2 deletions
|
|
@ -26,8 +26,12 @@ module OpenGraphHelper
|
|||
end
|
||||
|
||||
def og_type
|
||||
# the diaspora og namespace was already taken :(
|
||||
meta_tag_with_property('og:type', 'joindiaspora:post')
|
||||
meta_tag_with_property('og:type', og_namespace('frame'))
|
||||
end
|
||||
|
||||
def og_namespace(object)
|
||||
namespace = AppConfig[:open_graph_namespace].present? ? AppConfig[:open_graph_namespace] : 'joindiaspora'
|
||||
"#{namespace}:frame"
|
||||
end
|
||||
|
||||
def og_page_specific_tags(post)
|
||||
|
|
|
|||
|
|
@ -200,6 +200,9 @@ defaults: &defaults
|
|||
facebook_app_id: ''
|
||||
facebook_app_secret: ''
|
||||
|
||||
#this will be the namespace for your object, it should be configured in your FB app
|
||||
open_graph_namespace: ''
|
||||
|
||||
|
||||
## OAuth credentials for Twitter:
|
||||
twitter_consumer_key: ''
|
||||
|
|
|
|||
Loading…
Reference in a new issue