Am also having some problem with sharing audio/video,
I tried this code block to share audio file.
me = FbGraph::User.me(ACCESS_TOKEN)
me.feed!(
:message => 'Updating via FbGraph',
:source => 'http://s3.amazonaws.com/derbywire_development/system/audios/21/original/ROJA.mp3?1376993284',
:description => 'A Ruby wrapper for Facebook Graph API',
:name => 'FbGraph',
:type => 'mp3'
)
Its sharing the post the but the player is not coming for me. its simply showing the link.
Can any one help me out from this? Thanks in advance.
Related
Am also having some problem with sharing audio/video,
I tried this code block to share audio file.
me = FbGraph::User.me(ACCESS_TOKEN)
me.feed!(
:message => 'Updating via FbGraph',
:source => 'http://s3.amazonaws.com/derbywire_development/system/audios/21/original/ROJA.mp3?1376993284',
:description => 'A Ruby wrapper for Facebook Graph API',
:name => 'FbGraph',
:type => 'mp3'
)
Its sharing the post the but the player is not coming for me. its simply showing the link.
Can anyone help me out this problem?
I am new in FBGraph and ruby.
I am using FBGraph api for facebook and the following code for posting.
me = FbGraph::User.me(ACCESS_TOKEN)
me.feed!(
:message => 'Updating via FbGraph',
)
Its working fine for me.
I want to post a message containing an html tag Text
Please advice.
Thanks in Advance
You would add the following to me.feed! (I added some others just for good measure):
me.feed!(
:message => 'Updating via FbGraph',
:name => 'Update',
:link => 'http://www.somelink.com/',
:description => 'My description'
)
I'm trying to figure out how I can use the Gibbon gem in Rails to automatically add subscribers to specific interest groups in MailChimp?
I've found this article which details a non-Rails method for doing so: http://roman.tao.at/uncategorized/mailchimp-api-listsubscribe-listbatchsubscribe-and-groups/
I'd like to figure out how to implement that functionality using the Gibbon gem: https://github.com/amro/gibbon
FYI, I'm also a novice with both MailChimp and Rails.
Finally, after hours of perusing through code. I've found the example I'm looking for!
Thanks to TJ Moretto for providing this on a Google Groups thread:
I'm using the gibbon gem, but ran into the same types of issues.
Here's how I had to format the parameters to finally get this to work:
gb.list_subscribe({:id => "#{list.id}",
:email_address => user.email,
:update_existing => true,
:double_optin => false,
:send_welcome => false,
:merge_vars => {'FNAME' => "#{user.first_name}",
'LNAME' => "#{user.last_name}",
'GROUPINGS' => {0 => {'id' => grouping.id, 'groups' => "#{challenge.name}"}}}
})
Hope that helps.
Mailchimp Team - based on the number of issues that everyone runs into
when trying to do this (across all programming languages), I suggest
you update the API documentation to be more clear.
Update for version 2.0 of the MailChimp API and version 1.0 of Gibbon (For #Calin and posterity). Here are the necessary changes from the previous version. The API object is accessed like this now:
gb = Gibbon::API.new
And list methods like so:
gb.lists.subscribe(params)
Finally the :email_address parameter has been replaced by the :email parameter, which should be given a value of the following form: The value should itself be a hash with one key, either 'email' or 'leid', and the value should be either the email address of the subscriber or MC's unique identifier (LEID) for the subscriber.
So a full subscription call might look something like this:
gb = Gibbon::API.new
gb.lists.subscribe(:id => "ed6d1dfef4",
:email =>
{ "email" => "example#domain.com" },
:merge_vars =>
{:groupings =>
{
0 => { :id => "95", :groups => ["Some Group", "Another Group"]},
1 => { :id => "34", :groups => ["A Third Group"]}
}
},
:update_existing => "true",
:double_optin => "false",
:replace_interests => "false")
I am using RiCal gem to create calendar event in my ROR project. The issue i have is when i add attendee it adds the attendee as .
ATTENDEE:mailto:sanjay.swain#in.ibm.com
ATTENDEE:mailto:sanjayswa#gmail.com
But I want ATTENDEE as
ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;RSVP=
TRUE;CN=sanjay.swain#in.ibm.com;X-NUM-GUESTS=0:mailto:sanjay.swain#in.ibm.c
om
with ROLE, PARTSTAT etc.. Is there a way to get this result using RiCal gem..
I found the solution. Here is what I have done:
options = {'CUTYPE' => 'INDIVIDUAL','RSVP' => 'TRUE','ROLE' => 'REQ-PARTICIPANT','PARTSTAT' => 'NEEDS-ACTION','X-NUM-GUESTS' => '0'}
attendee_property = RiCal::PropertyValue::CalAddress.new(nil, :value => "mailto:"+attend, :params => options)
event.attendee_property = attendee_property
Okay I've read through the plugin comments and the docs as well and I have yet to come up with an answer as to how to do this. Here's my problem I want to use the :info_window_tabs and the :icon option, but I don't know what format to pass my information in. According to the documentation the following code should be correct. Here's my code:
#mapper.overlay_init(GMarker.new([map.lat, map.lng],
:title => map.name,
:info_window_tabs => [
{:tab => "HTML", :content => #marker_html},
{:tab => "Attachments", :content => "stuff"}],
:icon => {
:image => "../images/icon.png"
}))
The readme and documentation can be viewed here.
And the relevant ruby file that I am trying to interact with, including the author's comments, can be viewed here.
I have tried the #rubyonrails channel in IRC as well as emailing the author directly and reporting an issue at GitHub. It really is just a question of syntax.
Thanks!
Okay, so I finally got this figured out. Here's how you do it; :icon accepts a GIcon variable and :info_window_tabs accepts an array of GInfoWindowTabs. Here is how you would declare each with the plugin.
Declare GIcon
#mapper.icon_global_init(GIcon.new(:image => "../images/civil.png",
:icon_anchor => GPoint.new(0,0),
:shadow => "../images/shadow.png",
:shadow_size => GSize.new(37,32),
:info_window_anchor => GPoint.new(9,2)), "civil_icon")
#civil_icon = Variable.new("civil_icon")
Declare GInfoWindowTab
#tab1 = GInfoWindowTab.new('Tab 1 Label', 'HTML for inside of tab1')
#tab2 = GInfoWindowTab.new('Tab 2 Label', 'HTML for inside of tab2')
#window_tabs = [#tab1, #tab2]
Then in your GMarker declaration just do the following:
#mapper.overlay_init(GMarker.new([map.lat, map.lng],
:title => map.name,
:icon => #civil_icon,
:max_width => 300,
:info_window_tabs => #window_tabs))
And you're done.