[Facebooker-talk] problems publishing into Profile

Mike Mangino mmangino at elevatedrails.com
Thu Aug 21 16:36:55 EDT 2008


Hmm. That seems odd.

Sorry this is taking so long for us to figure out. I've got a couple  
of things to try:

1) Update to the newest Facebooker. I made changes this week that  
might help this.
2) I'm not 100% sure :locals=> will work. I think you need to  
do :assigns=> (I don't think that is your problem though)
3) If the upgrade and change don't help, can you post a new stack  
trace? I want to make sure I can look at the actual line that is  
causing the error.

Mike

On Aug 21, 2008, at 4:16 PM, Allen Walker wrote:

> Made some adjustments and still having the same problem. It's gotta  
> be an API bug?
>
> activity_publisher.rb
> class ActivityPublisher < Facebooker::Rails::Publisher
>
> include ApplicationHelper
>
> ...
> def profile_update(user)
>   send_as :profile
>   from user.facebook_session.user
>   recipients user.facebook_session.user
>   fbml = render({
>                   :partial => "profile",
>                   :locals => {:activities => user.activities}
>                 })
>   profile(fbml)
>   profile_main(fbml)
> end
>
> ...
> end
>
> _profile.erb
>
> This is a test.
>
> Publishing Test:
>
>
> >> user = User.find_by_id(1)
> => #<User id: 1, facebook_id: xxxxxxx, session_key:  
> "b77a85f20a91bc3effc3ba95-xxxxxxx", cell_phone_number: nil,  
> email_address: nil, contact_preference: nil, gender: "male",  
> created_at: "2008-08-09 01:30:40", updated_at: "2008-08-20 23:02:16">
> >> ActivityPublisher.deliver_profile_update(user)
> NoMethodError: You have a nil object when you didn't expect it!
> The error occurred while evaluating nil.post
>       from /home/slick/meetingup/vendor/plugins/facebooker/lib/ 
> facebooker/models/user.rb:203:in  
> `set_profile_fbml_without_bebo_adapter'
>       from /home/slick/meetingup/vendor/plugins/facebooker/lib/ 
> facebooker/adapters/bebo_adapter.rb:43:in `set_profile_fbml'
>       from /home/slick/meetingup/vendor/plugins/facebooker/lib/ 
> facebooker/rails/publisher.rb:287:in `send_message'
>       from /home/slick/meetingup/vendor/plugins/facebooker/lib/ 
> facebooker/rails/publisher.rb:384:in `method_missing'
>       from (irb):2
> _______________________________________________
> Facebooker-talk mailing list
> Facebooker-talk at rubyforge.org
> http://rubyforge.org/mailman/listinfo/facebooker-talk

--
Mike Mangino
http://www.elevatedrails.com





More information about the Facebooker-talk mailing list