Question: I've implemented a method for users to add their Facebook accounts to their site account. It was working fine until I switched from stage domain to my production domain. (They're hosted on different servers)

I'm redirecting the user to the Login URL as below:

```
$params = array("redirect_uri" => SITE_URL . "settings/accounts");
$login_url = $facebook->getLoginUrl($params);

```

In `SITE_URL . "settings/accounts"`, I check for $\_GET["state"], and finish the integration. The problem with the production server is, the $\_SESSION now only holds some gibberish (at least, to me) Facebook objects. The user data in $\_SESSION is gone, so that I can't bind the facebook\_id to his userID.

Am I missing something here?

Thanks.

Answer: 
> 
> Is there any progress being made anywhere on making this process simpler?)
> 
> 
> 

Yes: Yehuda Katz is leading a Kickstarter project to help:
<http://www.kickstarter.com/projects/1397300529/railsapp>

Looks like you may have an old openssl. 

Try this:

```
sudo port selfupdate

```

View the list of outdated ports:

```
port outdated

```

Clean up outdated ports:

```
sudo port clean outdated
sudo port upgrade outdated

```

See if you have any libssl:

```
find / | grep libssl.*dylib

```

Try installing postgresql from a Mac download:

```
http://www.postgresql.org/download/macosx/

```

Then try installing the gem as usual:

```
gem install pg

```

Or if you use sudo do:

```
sudo gem install pg

```
Normally this is a 64bit/32bit issue resp. a mismatch between your ruby version and your Postgresql Installation.
Depending on your architecture you have to make use of the correct ARCH flags.

Please see [this answer](https://stackoverflow.com/questions/2656562/how-to-install-gem-pg-on-snow-leopard/2680108#2680108) on stackoverflow.

Generally I have little to no problems using "[homebrew](https://brew.sh/)" and [RVM](https://rvm.io)

HTH