Coder Social home page Coder Social logo

omnicontacts's People

Contributors

asmatameem avatar brahmana avatar constantine-nikolaou avatar diego81 avatar gdiggs avatar goddamnyouryan avatar hasghari avatar jdiprete avatar karann avatar katiemccann avatar kbravi avatar kentosasa avatar mateuy-dev avatar mayerseidman avatar mkdynamic avatar nadaaldahleh avatar pfbernardo avatar pvos avatar rahul100885 avatar randyv12 avatar rewritten avatar rolme avatar rtdp avatar rubytastic avatar seanshealy avatar smingins avatar swanandp avatar townie avatar troex avatar xxswingxx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

omnicontacts's Issues

open oath window in popup and redirect the callback parent page somehow?

Many of the bigger websites use oath and have a popup for the auth window.
So your application is below the oath popup.

Is there some way to achieve this or is this impossible?

Im looking into the options at this moment as I have done before ut havent been able to get something solid working.

Rack::Lint::LintError at /contacts/gmail No Content-Type header found

I tried creating a new rails (v3.2.3) application and everything is working fine there. I could fetch the contacts.

But when I tried to implement the same for another rails (v3.0.9) application (using rack v1.2.4), got the error:

Ruby    /media/workspace/ynl/vendor/cache/ruby/1.9.1/gems/rack-1.2.4/lib/rack/lint.rb: in assert, line 19

Can anybody help fixing this?

Invalid_client error with gmail contacts oauth

Hi! First of all, thanks for the gem!

I think this requires a simple fix, but not sure where to look/see since it looks like I have everything correctly....

I have a link to [my_domain]/contacts/gmail on a test page. When I click on the link, I get the following error. I double-checked OAuth Key and Secret, and they are correct.

Error: invalid_client
Request Details
scope=https://www.google.com/m8/feeds
response_type=code
access_type=online
redirect_uri=http://[my_domain]/contacts/gmail/callback
approval_prompt=auto
client_id=[OAuth Consumer Key]

Any help would be much appreciated!

Thanks.

SocketError getaddrinfo: Hôte inconnu. on callback

Hi,

Once the user clicks on the gmail link (havent started tested the others yet), I go to google and on the callback i get this error:

Started POST "/contacts/gmail" for 127.0.0.1 at 2012-03-28 14:34:16 +0200

Started GET "/oauth2callback?code=4/JRqeE4JhdgYeqOtDesifrYFJ7FFY" for 127.0.0.1 at 2012-03-28 14:34:20 +0200

SocketError (getaddrinfo: H�te inconnu. ):

I'm running on localhost. Hôte Inconnu = unknown host in french :)

Want to pass username and password with request and want to avoid redirection

Hey, thanks for awesome info and example in readme, i'm able get the contacts now,but now in my site i dont want to redirect and trying to input username and pass with request and get ajax response and display because importing contacts is part of the form and i don't want to reload it. i saw "login_hint" parameter in authorization but it only has username option.i want to login and get contacts in background and get results.
any ideas?

URI mismatch error from Gmail

I am getting this
Error :The redirect URI in the request: http://example.com/contacts/gmail/callback did not match a registered redirect URI

But from my computer or credential I am able to access the email this error only showing when I am testing on other computer.

I use "/contacts/gmail/callback" as callback URL and also add this in my routes.rb file

Please help me.

Thanks in advance.
Salayhin

Capturing the Contact's Provider ID

Has anyone forked a solution that tracks the contact id passed by the provider?

For example with hotmail:
{"id":"contact.3dca7e65000000000000000000000011"

Gmail:
http://www.google.com/m8/feeds/contacts/liz%40gmail.com/base/8411573

Yahoo:
"uri": "http://social.yahooapis.com/v1/user/XMCDY3KDAYNPDILERMPN3PHPKU/contact/114"

The idea being that you want to track these ids so that on the next contact import you can find/update/skip through the previously imported records.

Thoughts? Thank

request.env['omnicontacts.user'] is empty

request.env['omnicontacts.user'] has no value when authenticating with a Google account. Is this just me having this issue? request.env['omnicontacts.contacts'] works as expected.

Contacts returned from Gmail has emails with the contact's name and a | char

I've been using omnicontacts in our production environment for nearly a year now (still on version 0.2.2!) and I haven't had any problems. However, in a recent import (around 1 month ago) from Gmail for one particular user returned 900 contacts, where all contacts had the email field formatted with 'FIRST_NAME LAST_NAME|[email protected]'. So for example, one email field would be "John Chow|[email protected]".

I'm not sure if anyone has seen this issue before, and while it only has happened once for all our imports, I just want to double check here before I brush it off as a one time burp from Gmail.

request.env['omnicontacts.contacts'] is empty in my callback when inviting hotmail contacts

I have the gem working for gmail. I can see the list of contacts in

@contacts = request.env['omnicontacts.contacts']

However, when importing via hotmail, the list is empty. I made sure that I have hotmail contacts. I double checked every settings in my live application (secret key, domain...)

Has anyone had a similar issue ? What can I try to diagnose further ?

Rack:Lint errors in development mode

Rack::Lint is automatically turned on in development mode and it causes errors when you redirect to a provider. So when I go to /contacts/yahoo I get

Rack::Lint::LintError at /contacts/yahoo
No Content-Type header found

Ruby /Users/.../.rvm/gems/ruby-1.9.2-p0/gems/rack-1.4.1/lib/rack/lint.rb: in assert, line 19
Web GET 127.0.0.1/contacts/yahoo
(more info given in the end)

These errors do not appear in test or production mode because Rack::Lint is turned off in test mode...

Looking around I saw a similar issue and patch here ... demandforce/rack-oauth2-server#31 and renatosnrg/rack-oauth2-server@03cd9ef

Can you integrate a similar solution while redirecting ?

More Debug Info :
GET
No GET data.
POST
No POST data.
Rack ENV
Variable Value
HTTP_ACCEPT
text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8
HTTP_ACCEPT_CHARSET
ISO-8859-1,utf-8;q=0.7,*;q=0.3
HTTP_ACCEPT_ENCODING
gzip,deflate,sdch
HTTP_ACCEPT_LANGUAGE
en-US,en;q=0.8
HTTP_CONNECTION
keep-alive
HTTP_COOKIE
remember_user_token=BAhbB1sGaV1JIiIkMmEkMTAkRVdIYnBkUWNHSGoyN2tRN3JpWDZHTwY6BkVU--7b1f213ca394eca4af5267caf05bc3c610d6282c; _session_id=02a91f0ed24c086ca1b5672dcfd2ca55
HTTP_HOST
127.0.0.1:8081
HTTP_REFERER
http://127.0.0.1:8081/rewards/friends
HTTP_USER_AGENT
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.57 Safari/537.1
HTTP_VERSION
HTTP/1.1
ORIGINAL_FULLPATH
/contacts/yahoo
PATH_INFO
/contacts/yahoo
QUERY_STRING
REMOTE_ADDR
127.0.0.1
REQUEST_METHOD
GET
REQUEST_PATH
/contacts/yahoo
REQUEST_URI
/contacts/yahoo
SCRIPT_NAME
SERVER_NAME
127.0.0.1
SERVER_PORT
8081
SERVER_PROTOCOL
HTTP/1.1
SERVER_SOFTWARE
Unicorn 4.3.1

Unable to fetch contacts from gmail with version 0.3.1 (trying to parse xml as json)

I have upgraded from version 0.2.2 to 0.3.1 and in the callback I am getting the following:

The error thrown is this:

JSON::ParserError at /google_callback
757: unexpected token at '<?xml version='1.0' encoding='UTF-8'?><feed...[more xml here]

In the trace, in omnicontacts-0.3.1/lib/omnicontacts/importer/gmail.rb l.36, the variable response_as_json is the response, but as xml. So maybe the request sent to gmail does not specify that the result must be as json... How to force the response from gmail to be json ?

I don't know how to troubleshoot further.

Any suggestions ?

Exception while fetching Hotmail contacts because HTTP 'headers' is being passed as Array instead of Hash

In the code at this line : https://github.com/Diego81/omnicontacts/blob/master/lib/omnicontacts/http_utils.rb#L77 the headers argument has a default value of an empty Array and that is what gets passed on to the Ruby's HTTP implementation resulting in an exception because Ruby's HTTP library expects it to be a Hash.

Relevant documentation is here : https://github.com/ruby/ruby/blob/trunk/lib/net/http.rb#L1090

The exception occurs at this point : https://github.com/ruby/ruby/blob/trunk/lib/net/http/generic_request.rb#L34 where it is trying to see if initheader has any keys, but the Array object that is sent from earlier does not respond to keys method resulting in NoMethodError.

The change needed to fix this is minimal. The [] should change to {}. I am submitting a pull request regarding the same.

Note : In practice this error occurs only with Hotmail importer. Gmail importer providers its own Hash of headers, overriding the default value and Yahoo importer uses the http_get method which does not have headers parameter.

Unable to find importer for facebook

Hey Guys,

I have tried using latest version of omnicontacts 0.2.5, I have tried to import contacts for facebook, but when i define importer in config/initializer/omnicontacts.rb. It gives error "Could not find importer facebook"

Then, I looked into the gem, i see there is no importer for facebook.

Please guide me.

Page Renders an error when refreshing the page rendered by the callback.

I'm just wondering if this is an existing issue or not, or if we just implemented it wrongly. After providing my credentials and agreeing on gmail/yahoo authentication it renders my callback page with the list of my contacts. Now when I tried to refresh the page it renders a Routing Error.

No route matches [GET] "/contacts/failure"

Please let me know your thoughts on this.

Thanks,
marc

Is it possible to change the Gmail permissions message to user?

Hi All,

Is there a way to adjust the message that Google displays to the user? The problem is that some users might think that the app will edit or delete existing contacts rather than simply making a copy of them. I looked in https://code.google.com/apis/console/ but didn't find a way to adjust the message. Thanks!!

Default Message from Google:
[App Name] is requesting permission to:
Manage your contacts
View and manage your Google Contacts

Linkedin Support

Can we please have support for linkedin as well to import the address book?

Getting undefined method `include?' for nil:NilClass

Seems to be related to rack 1.4 support. From the current OmniAuth code it appears that line 26 of builder.rb should be:

@ins << @app unless rack14? || @ins.include?(@app)

Going to test and if all looks good will submit a pull request.

Thanks

Windows Live API is useless for pulling contacts

I think maybe Hotmail should be removed from the list of supported e-mail services. After spending too much time debugging why omnicontacts was returning an empty array for Hotmail contacts, I realized it's because the API returns this:

{
   "data": [
      {
         "first_name": "John", 
         "last_name": "Doe", 
         "name": "John Doe", 
          <snip>
         "email_hashes": [
            "f37cb083473f0fef7f3b4172ccd2ff6070f3e7ccd1752be79c3a2d7ba40decd5"
         ], 
         "updated_time": "2012-08-01T16:29:17+0000"
      }
   ]
}

So, in other words, you can't ever get a list of e-mail addresses from it.

http://stackoverflow.com/questions/6785828/get-a-users-contacts-email-phone-addresses-using-windows-live-messenger-connec

How would this gem be modified to accept 'simple search queries' using q?

I had to add an extra parameter to the 'fetch_contacts_using_access_token' in the gmail.rb importer file to accept an additional 'contacts_req_params' like this:

def contacts_req_params
{ "q" => @contact_name.to_s, "max-results" => @max_results.to_s }
end

This causes an error message in the console, 'This services does not support the q parameter', which should be allowed according to the API docs. Any advice/input on how to extend the functionality to accept string parameters would be awesome. Thanks!

myapp.com/contacts/gmail opens auth window even when not logged in

myapp.com/contacts/gmail creates an open link that opens the oauth screen for a selected provider that cannot be protected behind a login.

I need better way to handle this, currently using devise and in regular controllers you can set it so a users first needs to be logged in.

Is there a way to force this somehow?
This gem is very nice but these things still a bit rough out of the box to use it as production

v0.3.4 TypeError: no implicit conversion of String into Integer gmail.rb:64

Looks like this is not the code that is in the latest master branch. Can you update rubygems.org?

Thanks

TypeError: no implicit conversion of String into Integer

/vendor/bundle/ruby/2.0.0/gems/omnicontacts-0.3.4/lib/omnicontacts/importer/gmail.rb:64 in "[]"
/vendor/bundle/ruby/2.0.0/gems/omnicontacts-0.3.4/lib/omnicontacts/importer/gmail.rb:64 in "block in contacts_from_response"
/vendor/bundle/ruby/2.0.0/gems/omnicontacts-0.3.4/lib/omnicontacts/importer/gmail.rb:41 in "each"
/vendor/bundle/ruby/2.0.0/gems/omnicontacts-0.3.4/lib/omnicontacts/importer/gmail.rb:41 in "contacts_from_response"
/vendor/bundle/ruby/2.0.0/gems/omnicontacts-0.3.4/lib/omnicontacts/importer/gmail.rb:24 in "fetch_contacts_using_access_token"
/vendor/bundle/ruby/2.0.0/gems/omnicontacts-0.3.4/lib/omnicontacts/middleware/oauth2.rb:52 in "fetch_contacts"
/vendor/bundle/ruby/2.0.0/gems/omnicontacts-0.3.4/lib/omnicontacts/middleware/base_oauth.rb:66 in "block in handle_callback"
/vendor/bundle/ruby/2.0.0/gems/omnicontacts-0.3.4/lib/omnicontacts/middleware/base_oauth.rb:76 in "execute_and_rescue_exceptions"
/vendor/bundle/ruby/2.0.0/gems/omnicontacts-0.3.4/lib/omnicontacts/middleware/base_oauth.rb:62 in "handle_callback"
/vendor/bundle/ruby/2.0.0/gems/omnicontacts-0.3.4/lib/omnicontacts/middleware/base_oauth.rb:39 in "call"
/vendor/bundle/ruby/2.0.0/gems/omnicontacts-0.3.4/lib/omnicontacts/builder.rb:27 in "call"
/vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.6.8.164/lib/new_relic/rack/error_collector.rb:43 in "call"
/vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.6.8.164/lib/new_relic/rack/agent_hooks.rb:22 in "call"
/vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.6.8.164/lib/new_relic/rack/browser_monitoring.rb:16 in "call"
/vendor/bundle/ruby/2.0.0/gems/hirefireapp-0.2.0/lib/hirefireapp/middleware.rb:27 in "call"
/vendor/bundle/ruby/2.0.0/gems/sass-3.2.12/lib/sass/plugin/rack.rb:54 in "call"
/vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.13.rc2/lib/action_dispatch/middleware/best_standards_support.rb:17 in "call"
/vendor/bundle/ruby/2.0.0/gems/rack-1.4.5/lib/rack/etag.rb:23 in "call"
/vendor/bundle/ruby/2.0.0/gems/rack-1.4.5/lib/rack/conditionalget.rb:25 in "call"
/vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.13.rc2/lib/action_dispatch/middleware/head.rb:14 in "call"
/vendor/bundle/ruby/2.0.0/gems/remotipart-1.2.1/lib/remotipart/middleware.rb:27 in "call"
/vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.13.rc2/lib/action_dispatch/middleware/params_parser.rb:21 in "call"
/vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.13.rc2/lib/action_dispatch/middleware/flash.rb:242 in "call"
/vendor/bundle/ruby/2.0.0/gems/rack-1.4.5/lib/rack/session/abstract/id.rb:210 in "context"
/vendor/bundle/ruby/2.0.0/gems/rack-1.4.5/lib/rack/session/abstract/id.rb:205 in "call"
/vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.13.rc2/lib/action_dispatch/middleware/cookies.rb:341 in "call"
/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.13.rc2/lib/active_record/query_cache.rb:64 in "call"
/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.13.rc2/lib/active_record/connection_adapters/abstract/connection_pool.rb:479 in "call"
/vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.13.rc2/lib/action_dispatch/middleware/callbacks.rb:28 in "block in call"
/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13.rc2/lib/active_support/callbacks.rb:405 in "_run__4304472764325038590__call__1715657587715444291__callbacks"
/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13.rc2/lib/active_support/callbacks.rb:405 in "__run_callback"
/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13.rc2/lib/active_support/callbacks.rb:385 in "_run_call_callbacks"
/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13.rc2/lib/active_support/callbacks.rb:81 in "run_callbacks"
/vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.13.rc2/lib/action_dispatch/middleware/callbacks.rb:27 in "call"
/vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.13.rc2/lib/action_dispatch/middleware/remote_ip.rb:31 in "call"
/vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.13.rc2/lib/action_dispatch/middleware/debug_exceptions.rb:16 in "call"
/vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.13.rc2/lib/action_dispatch/middleware/show_exceptions.rb:56 in "call"
/vendor/bundle/ruby/2.0.0/gems/railties-3.2.13.rc2/lib/rails/rack/logger.rb:32 in "call_app"
/vendor/bundle/ruby/2.0.0/gems/railties-3.2.13.rc2/lib/rails/rack/logger.rb:16 in "block in call"
/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13.rc2/lib/active_support/tagged_logging.rb:22 in "tagged"
/vendor/bundle/ruby/2.0.0/gems/railties-3.2.13.rc2/lib/rails/rack/logger.rb:16 in "call"
/vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.13.rc2/lib/action_dispatch/middleware/request_id.rb:22 in "call"
/vendor/bundle/ruby/2.0.0/gems/rack-1.4.5/lib/rack/methodoverride.rb:21 in "call"
/vendor/bundle/ruby/2.0.0/gems/rack-1.4.5/lib/rack/runtime.rb:17 in "call"
/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13.rc2/lib/active_support/cache/strategy/local_cache.rb:72 in "call"
/vendor/bundle/ruby/2.0.0/gems/rack-1.4.5/lib/rack/lock.rb:15 in "call"
/vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.13.rc2/lib/action_dispatch/middleware/static.rb:63 in "call"
/vendor/bundle/ruby/2.0.0/gems/rack-cache-1.2/lib/rack/cache/context.rb:136 in "forward"
/vendor/bundle/ruby/2.0.0/gems/rack-cache-1.2/lib/rack/cache/context.rb:245 in "fetch"
/vendor/bundle/ruby/2.0.0/gems/rack-cache-1.2/lib/rack/cache/context.rb:185 in "lookup"
/vendor/bundle/ruby/2.0.0/gems/rack-cache-1.2/lib/rack/cache/context.rb:66 in "call!"
/vendor/bundle/ruby/2.0.0/gems/rack-cache-1.2/lib/rack/cache/context.rb:51 in "call"
/vendor/bundle/ruby/2.0.0/gems/railties-3.2.13.rc2/lib/rails/engine.rb:479 in "call"
/vendor/bundle/ruby/2.0.0/gems/railties-3.2.13.rc2/lib/rails/application.rb:223 in "call"
/vendor/bundle/ruby/2.0.0/gems/railties-3.2.13.rc2/lib/rails/railtie/configurable.rb:30 in "method_missing"
/vendor/bundle/ruby/2.0.0/gems/rack-1.4.5/lib/rack/deflater.rb:13 in "call"
/vendor/bundle/ruby/2.0.0/gems/unicorn-4.6.3/lib/unicorn/http_server.rb:552 in "process_client"
/vendor/bundle/ruby/2.0.0/gems/unicorn-4.6.3/lib/unicorn/http_server.rb:632 in "worker_loop"
/vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.6.8.164/lib/new_relic/agent/instrumentation/unicorn_instrumentation.rb:22 in "call"
/vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.6.8.164/lib/new_relic/agent/instrumentation/unicorn_instrumentation.rb:22 in "block (4 levels) in <top (required)>"
/vendor/bundle/ruby/2.0.0/gems/unicorn-4.6.3/lib/unicorn/http_server.rb:500 in "spawn_missing_workers"
/vendor/bundle/ruby/2.0.0/gems/unicorn-4.6.3/lib/unicorn/http_server.rb:142 in "start"
/vendor/bundle/ruby/2.0.0/gems/unicorn-4.6.3/bin/unicorn:126 in "<top (required)>"
/vendor/bundle/ruby/2.0.0/bin/unicorn:23 in "load"
/vendor/bundle/ruby/2.0.0/bin/unicorn:23 in "<main>"

max contacts for gmail

Question-

How would you want to handle the max number of contacts for Gmail - if it were to be a configurable parameter? Right now it's set to 100 in the importer, but I'm thinking if in the initializer you could pass a parameter like:

importer :gmail, "xxx", "yyy", :max_contacts => 1000

or something like that. Have you given this any thought?

Great gem by the way!

Arun

Internal Server Error uninitialized constant ContactsList

i'm able to get the response from the site but not able to rout to my page and getting routing errors

uninitialized constant ContactsLists
or
uninitialized constant ContactsListsController

config files are below
initilizers/omnicontacts.rb

Rails.application.middleware.use OmniContacts::Builder do
importer :gmail, "client_id", "client_secret", {:redirect_path => "/contact_callback"}

end
in google console

Redirect URI is set to http://localhost:3000/contact_callback

and i want to route the data to my contact_list controller and invite method so in routes i have defined

match "contact_callback" => '/contacts_lists/invitenew'

and i'm getting

http://localhost:3000/contact_callback?code=4/jGYoPAYuZiuW5uR2UjDPmqF6Hjtj.4oxoCiD-BVUQXE-sT2ZLcbShVA5nhwI

let me know what i'm doing wrong.

thanks

client_secret no longer exists?

Thanks for writing this great gem, I try to make it work in my app but the client_secret is no longer available in the google api console.

Or does one have to enable any of the api's in the google api console? Its very unclear at this point, could you perhaps please upgrade the docs with a step by step on how to set it up?

Thanks in advanche for all your hard work on this gem it rocks

I tried with below keeping client_secret empty ( no idea where to find it else )

initializer:

require "omnicontacts"

Rails.application.middleware.use OmniContacts::Builder do
#importer :gmail, "xxx.apps.googleusercontent.com", "", {:redirect_path => "/oauth2callback", :ssl_ca_file => "/etc/ssl/certs/curl-ca-bundle.crt"}
importer :gmail, "xxx.apps.googleusercontent.com", "", {:redirect_path => "/callback", :ssl_ca_file => "/etc/ssl/certs/curl-ca-bundle.crt"}
importer :yahoo, "consumer_id", "consumer_secret", {:callback_path => '/callback'}
importer :hotmail, "client_id", "client_secret"
end

this results in:

invalid_client error

scope=https://www.google.com/m8/feeds
response_type=code
access_type=offline
redirect_uri=http://mydomain.com/oauth2callback
approval_prompt=force
client_id=client_id

And where should the .crt be placed ( what file is this and how to use it?)

Unable to get contacts from yahoo

I have got contacts from the google as I registered in google developer console .

But I unable to get contacts from yahoo while redirecting to app and I registered in yahoo developers and given redirection url where It has been redirecting without any data as below,

/callback?oauth_token=qvufcvp&oauth_verifier=hp9knk

Please help me, Is there any wrong I did?

Thanks in advance.

How to get user's token and email address?

Is there a way to get the email address of the user who fetched the records, as well as secret token to store in database so that he doesn't have to authorize it every time. I need it for gmail. There should be a guide for it in README.

undefined method use_ssl when contacting to google

I'm obtaining the following error when contacting to google.
NoMethodError (undefined method `use_ssl=' for #<Net::HTTP accounts.google.com:443 open=false>):

Full stack trace:

omnicontacts (0.2.3) lib/omnicontacts/http_utils.rb:84:in https_connection' omnicontacts (0.2.3) lib/omnicontacts/http_utils.rb:69:inhttps_post'
omnicontacts (0.2.3) lib/omnicontacts/authorization/oauth2.rb:43:in fetch_access_token' omnicontacts (0.2.3) lib/omnicontacts/middleware/oauth2.rb:50:infetch_contacts'
omnicontacts (0.2.3) lib/omnicontacts/middleware/base_oauth.rb:66:in handle_callback' omnicontacts (0.2.3) lib/omnicontacts/middleware/base_oauth.rb:76:inexecute_and_rescue_exceptions'
omnicontacts (0.2.3) lib/omnicontacts/middleware/base_oauth.rb:62:in handle_callback' omnicontacts (0.2.3) lib/omnicontacts/middleware/base_oauth.rb:39:incall'
omnicontacts (0.2.3) lib/omnicontacts/builder.rb:27:in call' warden (1.0.6) lib/warden/manager.rb:35:incall'
warden (1.0.6) lib/warden/manager.rb:34:in catch' warden (1.0.6) lib/warden/manager.rb:34:incall'
actionpack (3.2.9) lib/action_dispatch/middleware/best_standards_support.rb:17:in call' rack (1.4.1) lib/rack/etag.rb:23:incall'
rack (1.4.1) lib/rack/conditionalget.rb:25:in call' actionpack (3.2.9) lib/action_dispatch/middleware/head.rb:14:incall'
actionpack (3.2.9) lib/action_dispatch/middleware/params_parser.rb:21:in call' actionpack (3.2.9) lib/action_dispatch/middleware/flash.rb:242:incall'
rack (1.4.1) lib/rack/session/abstract/id.rb:205:in context' rack (1.4.1) lib/rack/session/abstract/id.rb:200:incall'
actionpack (3.2.9) lib/action_dispatch/middleware/cookies.rb:341:in call' activerecord (3.2.9) lib/active_record/query_cache.rb:64:incall'
activerecord (3.2.9) lib/active_record/connection_adapters/abstract/connection_pool.rb:479:in call' actionpack (3.2.9) lib/action_dispatch/middleware/callbacks.rb:28:incall'
activesupport (3.2.9) lib/active_support/callbacks.rb:405:in _run__84874920__call__4__callbacks' activesupport (3.2.9) lib/active_support/callbacks.rb:405:insend'
activesupport (3.2.9) lib/active_support/callbacks.rb:405:in __run_callback' activesupport (3.2.9) lib/active_support/callbacks.rb:385:in_run_call_callbacks'
activesupport (3.2.9) lib/active_support/callbacks.rb:81:in send' activesupport (3.2.9) lib/active_support/callbacks.rb:81:inrun_callbacks'
actionpack (3.2.9) lib/action_dispatch/middleware/callbacks.rb:27:in call' actionpack (3.2.9) lib/action_dispatch/middleware/reloader.rb:65:incall'
actionpack (3.2.9) lib/action_dispatch/middleware/remote_ip.rb:31:in call' actionpack (3.2.9) lib/action_dispatch/middleware/debug_exceptions.rb:16:incall'
actionpack (3.2.9) lib/action_dispatch/middleware/show_exceptions.rb:56:in call' railties (3.2.9) lib/rails/rack/logger.rb:32:incall_app'
railties (3.2.9) lib/rails/rack/logger.rb:16:in call' activesupport (3.2.9) lib/active_support/tagged_logging.rb:22:intagged'
railties (3.2.9) lib/rails/rack/logger.rb:16:in call' actionpack (3.2.9) lib/action_dispatch/middleware/request_id.rb:22:incall'
rack (1.4.1) lib/rack/methodoverride.rb:21:in call' rack (1.4.1) lib/rack/runtime.rb:17:incall'
activesupport (3.2.9) lib/active_support/cache/strategy/local_cache.rb:72:in call' rack (1.4.1) lib/rack/lock.rb:15:incall'
actionpack (3.2.9) lib/action_dispatch/middleware/static.rb:62:in call' railties (3.2.9) lib/rails/engine.rb:479:incall'
railties (3.2.9) lib/rails/application.rb:223:in call' rack (1.4.1) lib/rack/content_length.rb:14:incall'
railties (3.2.9) lib/rails/rack/log_tailer.rb:17:in call' rack (1.4.1) lib/rack/handler/webrick.rb:59:inservice'
/usr/lib/ruby/1.8/webrick/httpserver.rb:104:in service' /usr/lib/ruby/1.8/webrick/httpserver.rb:65:inrun'
/usr/lib/ruby/1.8/webrick/server.rb:173:in start_thread' /usr/lib/ruby/1.8/webrick/server.rb:162:instart'
/usr/lib/ruby/1.8/webrick/server.rb:162:in start_thread' /usr/lib/ruby/1.8/webrick/server.rb:95:instart'
/usr/lib/ruby/1.8/webrick/server.rb:92:in each' /usr/lib/ruby/1.8/webrick/server.rb:92:instart'
/usr/lib/ruby/1.8/webrick/server.rb:23:in start' /usr/lib/ruby/1.8/webrick/server.rb:82:instart'
rack (1.4.1) lib/rack/handler/webrick.rb:13:in run' rack (1.4.1) lib/rack/server.rb:265:instart'
railties (3.2.9) lib/rails/commands/server.rb:70:in start' railties (3.2.9) lib/rails/commands.rb:55 railties (3.2.9) lib/rails/commands.rb:50:intap'
railties (3.2.9) lib/rails/commands.rb:50
script/rails:6:in `require'
script/rails:6

Internal-error when getting yahoo contacts

** UPDATE ** working now...apparently any error in the controller method handling the callback raises an internal_error. In my case, this statement "raise request.env["omnicontacts.contacts"].to_yaml" was causing the error, no idea why.

After clicking the link to get yahoo contacts i get redirected to
"/contacts/failure?error_message=internal_error"

In the rails console, i get this message:
"Error internal_error while processing /contacts/yahoo/callback" followed by my contacts.

So my contacts are being fetched but the error is also thrown. Any ideas as to why this would happen? It would be helpful if internal_error was a little verbose about what the actual error is.

Error redirecting

I'm trying to integrate omnicontacts in sinatra and, because sinatra uses lint, I'm getting the following error if I'm not in production mode when the browser tries to redirect. This happens to hotmail, gmail and yahoo:

Rack::Lint::LintError at /contacts/yahoo
No Content-Type header found

Ruby ruby/gems/1.9.1/gems/rack-1.3.0/lib/rack/lint.rb: in assert, line 19

To ensure Rack protocol is being followed, there must be a Content-type header in all responses, except when the status is 1xx, 204 or 304.

So, for example, in:
[302, {"location" => authorization_url}, []] you need to change to:
[302, {Content-Type" => "respective_content_type", "location" => authorization_url}, []]

This need to be done in every place where you are returning a http status like the line above.

I think for the redirect url the content type would be "application/x-www-form-urlencoded"

Yahoo OAUTH1 Issues

omnicontacts 0.2.0

The callback catches the redirect from Yahoo after giving permission to the application, but errors occur.

I was getting this first:
NoMethodError (undefined method `<=>' for :oauth_signature_method:Symbol):

Then after implementing hotmail, I tried again, and got this:
NoMethodError (undefined method `<=>' for :view:Symbol):

After commenting out this in the yahoo.rb
#:view => "compact"

The first error returned again, commenting that out just lead to another error on another item in the hash, and so on. This seems like a syntax issue with rails, not necessarily the plugin, but I'm not sure.

Hotmail The provided value for the input parameter 'redirect_uri' is not valid. The domain of the provided redirect URI must match the domain of the redirect URI registered for this app.

Hotmail throws an
The provided value for the input parameter 'redirect_uri' is not valid. The domain of the provided redirect URI must match the domain of the redirect URI registered for this app.

I followed all docs and the example app, there should not be a redirect_uri param in the initialiser at hotmail section?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.