Skip to content

Commit

Permalink
fix fbpost bug and post count redirection route
Browse files Browse the repository at this point in the history
  • Loading branch information
alemyis committed Mar 16, 2011
1 parent e99f8a2 commit 5a554a5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion app/controllers/application_controller.rb
Expand Up @@ -13,6 +13,10 @@ def fetan
end

def fbcanvas
redirect_to :controller => 'misales', :action => 'index'
if(params[:fbpost].nil?) then
redirect_to :controller => 'misales', :action => 'index'
else
redirect_to :controller => 'misales', :action => 'fbpost'
end
end
end
2 changes: 1 addition & 1 deletion app/views/misales/_fbPost.html.erb
Expand Up @@ -4,4 +4,4 @@ type='button'
class='actionButton'
value='Post'
style='background-position: 2px -0px;background-image: url(http://b.static.ak.fbcdn.net/rsrc.php/v1/zz/r/r9ad093yvZ9.png);background-repeat: no-repeat;display: inline-block;padding-left:20px;'
onclick='javascript:window.open(<%= "\"http://www.facebook.com/dialog/feed?app_id=#{ApplicationHelper.FB_APP_ID}&redirect_uri=#{ApplicationHelper.FB_CANVAS}/misales/#{misale.id}/fbpost&display=popup&&message=#{misale.name}&link=#{ApplicationHelper.FB_CANVAS_PAGE}/?page=#{misale.id}&source=#{misale.illustration}\"" %>, "FBPost","height=200,width=580");return false;' />
onclick='javascript:window.open(<%= "\"http://www.facebook.com/dialog/feed?app_id=#{ApplicationHelper.FB_APP_ID}&redirect_uri=#{ApplicationHelper.FB_CANVAS}/fbcanvas/?fbpost=#{misale.id}&display=popup&&message=#{misale.name}&link=#{ApplicationHelper.FB_CANVAS}/misales/?page=#{misale.id}&source=#{misale.illustration}\"" %>, "FBPost","height=200,width=580");return false;' />

0 comments on commit 5a554a5

Please sign in to comment.